Skip to content

Commit 3573acc

Browse files
committed
Undid temporary hack introduced by rust-lang#66392.
1 parent 7c4ad1f commit 3573acc

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/librustc_typeck/astconv.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -1409,15 +1409,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
14091409
// removing the dummy `Self` type (`trait_object_dummy_self`).
14101410
let trait_ref_to_existential = |trait_ref: ty::TraitRef<'tcx>| {
14111411
if trait_ref.self_ty() != dummy_self {
1412-
// FIXME: There appears to be a missing filter on top of `expand_trait_aliases`,
1413-
// which picks up non-supertraits where clauses - but also, the object safety
1414-
// completely ignores trait aliases, which could be object safety hazards. We
1415-
// `delay_span_bug` here to avoid an ICE in stable even when the feature is
1416-
// disabled. (#66420)
1417-
tcx.sess.delay_span_bug(DUMMY_SP, &format!(
1418-
"trait_ref_to_existential called on {:?} with non-dummy Self",
1419-
trait_ref,
1420-
));
1412+
bug!("trait_ref_to_existential called on {:?} with non-dummy Self", trait_ref);
14211413
}
14221414
ty::ExistentialTraitRef::erase_self_ty(tcx, trait_ref)
14231415
};

0 commit comments

Comments
 (0)