From 3573acc5728ec1b2adbb6ab2558bb3b46716eeda Mon Sep 17 00:00:00 2001 From: Alexander Regueiro Date: Mon, 25 Nov 2019 20:48:59 +0000 Subject: [PATCH] Undid temporary hack introduced by #66392. --- src/librustc_typeck/astconv.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs index b1b0a703d4cf1..4b47fa789c111 100644 --- a/src/librustc_typeck/astconv.rs +++ b/src/librustc_typeck/astconv.rs @@ -1409,15 +1409,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { // removing the dummy `Self` type (`trait_object_dummy_self`). let trait_ref_to_existential = |trait_ref: ty::TraitRef<'tcx>| { if trait_ref.self_ty() != dummy_self { - // FIXME: There appears to be a missing filter on top of `expand_trait_aliases`, - // which picks up non-supertraits where clauses - but also, the object safety - // completely ignores trait aliases, which could be object safety hazards. We - // `delay_span_bug` here to avoid an ICE in stable even when the feature is - // disabled. (#66420) - tcx.sess.delay_span_bug(DUMMY_SP, &format!( - "trait_ref_to_existential called on {:?} with non-dummy Self", - trait_ref, - )); + bug!("trait_ref_to_existential called on {:?} with non-dummy Self", trait_ref); } ty::ExistentialTraitRef::erase_self_ty(tcx, trait_ref) };