diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2019-11-14 11:29:01 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2019-11-17 14:40:41 -0800 |
| commit | 8d1c2612f818f6db6c626347138d5a20cababcb2 (patch) | |
| tree | 68d201e06da9652d476d1f19665a2b38c1f9f247 | |
| parent | 578bc438b0cd17cab59df335063d1b273ef22ddb (diff) | |
| download | rust-8d1c2612f818f6db6c626347138d5a20cababcb2.tar.gz rust-8d1c2612f818f6db6c626347138d5a20cababcb2.zip | |
review comments
| -rw-r--r-- | src/librustc_typeck/astconv.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-65673.rs | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs index 46559422b03..205e3efc7f3 100644 --- a/src/librustc_typeck/astconv.rs +++ b/src/librustc_typeck/astconv.rs @@ -1231,6 +1231,10 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { trait_ref: ty::TraitRef<'tcx>, ) -> ty::ExistentialTraitRef<'tcx> { if trait_ref.self_ty() != self.tcx().types.trait_object_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) self.tcx().sess.delay_span_bug(DUMMY_SP, &format!( "trait_ref_to_existential called on {:?} with non-dummy Self", trait_ref, diff --git a/src/test/ui/issues/issue-65673.rs b/src/test/ui/issues/issue-65673.rs index ea1d70194b1..4b47bd493a5 100644 --- a/src/test/ui/issues/issue-65673.rs +++ b/src/test/ui/issues/issue-65673.rs @@ -1,4 +1,4 @@ -#![feature(trait_alias)] +#![feature(trait_alias)] // Enabled to reduce stderr output, but can be triggered even if disabled. trait Trait {} trait WithType { type Ctx; |
