]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/bound_reduction2.rs
Auto merge of #106503 - cjgillot:remap-nofilter, r=oli-obk
[rust.git] / tests / 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     ()
17     //~^ ERROR expected generic type parameter, found `<T as TraitWithAssoc>::Assoc`
18 }