Skip to content

Commit

Permalink
Undid temporary hack introduced by rust-lang#66392.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexreg committed Nov 29, 2019
1 parent 7c4ad1f commit 3573acc
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/librustc_typeck/astconv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
};
Expand Down

0 comments on commit 3573acc

Please sign in to comment.