File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ #![ feature( type_alias_impl_trait) ]
2+
3+ pub trait TraitWithAssoc {
4+ type Assoc ;
5+ }
6+
7+ pub type Foo < V > = impl Trait < V :: Assoc > ;
8+ //~^ ERROR
9+ //~^^ ERROR
10+
11+ pub trait Trait < U > { }
12+
13+ impl < W > Trait < W > for ( ) { }
14+
15+ pub fn foo_desugared < T : TraitWithAssoc > ( _: T ) -> Foo < T > {
16+ ( )
17+ }
Original file line number Diff line number Diff line change 1+ error[E0220]: associated type `Assoc` not found for `V`
2+ --> $DIR/issue-96287.rs:7:33
3+ |
4+ LL | pub type Foo<V> = impl Trait<V::Assoc>;
5+ | ^^^^^ there is a similarly named associated type `Assoc` in the trait `TraitWithAssoc`
6+
7+ error[E0220]: associated type `Assoc` not found for `V`
8+ --> $DIR/issue-96287.rs:7:33
9+ |
10+ LL | pub type Foo<V> = impl Trait<V::Assoc>;
11+ | ^^^^^ there is a similarly named associated type `Assoc` in the trait `TraitWithAssoc`
12+
13+ error: aborting due to 2 previous errors
14+
15+ For more information about this error, try `rustc --explain E0220`.
You can’t perform that action at this time.
0 commit comments