Skip to content

Commit fa5138b

Browse files
committed
Remove FromCycleError impl for SymbolName.
It has no effect. `symbol_name` is the only query that produces a `SymbolName`. If it was marked with `cycle_delayed_bug`/`cycle_stash` then this `FromCycleError` impl would make sense, but that's not the case. Maybe it was the case in the past.
1 parent 65b76a4 commit fa5138b

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

compiler/rustc_query_impl/src/from_cycle_error.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,6 @@ impl<'tcx> FromCycleError<'tcx> for Result<ty::EarlyBinder<'_, Ty<'_>>, CyclePla
5656
}
5757
}
5858

59-
impl<'tcx> FromCycleError<'tcx> for ty::SymbolName<'_> {
60-
fn from_cycle_error(tcx: TyCtxt<'tcx>, _: CycleError, _guar: ErrorGuaranteed) -> Self {
61-
// SAFETY: This is never called when `Self` is not `SymbolName<'tcx>`.
62-
// FIXME: Represent the above fact in the trait system somehow.
63-
unsafe {
64-
std::mem::transmute::<ty::SymbolName<'tcx>, ty::SymbolName<'_>>(ty::SymbolName::new(
65-
tcx, "<error>",
66-
))
67-
}
68-
}
69-
}
70-
7159
impl<'tcx> FromCycleError<'tcx> for ty::Binder<'_, ty::FnSig<'_>> {
7260
fn from_cycle_error(tcx: TyCtxt<'tcx>, cycle_error: CycleError, guar: ErrorGuaranteed) -> Self {
7361
let err = Ty::new_error(tcx, guar);

0 commit comments

Comments
 (0)