]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/bound_reduction2.rs
a15074c35936bb2d10cd04ac5d8b5cb27908c086
[rust.git] / src / test / ui / type-alias-impl-trait / bound_reduction2.rs
1 #![feature(type_alias_impl_trait)]
2
3 fn main() {}
4
5 trait TraitWithAssoc {
6     type Assoc;
7 }
8
9 type Foo<V> = impl Trait<V>;
10
11 trait Trait<U> {}
12
13 impl<W> Trait<W> for () {}
14
15 fn foo_desugared<T: TraitWithAssoc>(_: T) -> Foo<T::Assoc> {
16     //~^ ERROR non-defining opaque type use in defining scope
17     ()
18 }