mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
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.
This commit is contained in:
@@ -56,18 +56,6 @@ fn from_cycle_error(_tcx: TyCtxt<'tcx>, _: CycleError, guar: ErrorGuaranteed) ->
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tcx> FromCycleError<'tcx> for ty::SymbolName<'_> {
|
||||
fn from_cycle_error(tcx: TyCtxt<'tcx>, _: CycleError, _guar: ErrorGuaranteed) -> Self {
|
||||
// SAFETY: This is never called when `Self` is not `SymbolName<'tcx>`.
|
||||
// FIXME: Represent the above fact in the trait system somehow.
|
||||
unsafe {
|
||||
std::mem::transmute::<ty::SymbolName<'tcx>, ty::SymbolName<'_>>(ty::SymbolName::new(
|
||||
tcx, "<error>",
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tcx> FromCycleError<'tcx> for ty::Binder<'_, ty::FnSig<'_>> {
|
||||
fn from_cycle_error(tcx: TyCtxt<'tcx>, cycle_error: CycleError, guar: ErrorGuaranteed) -> Self {
|
||||
let err = Ty::new_error(tcx, guar);
|
||||
|
||||
Reference in New Issue
Block a user