2 // Regression test for issue #67844
3 // Ensures that we properly handle nested TAIT occurrences
4 // with generic parameters
6 #![feature(type_alias_impl_trait)]
8 trait WithAssoc { type AssocType; }
12 type Return<A> = impl WithAssoc<AssocType = impl WithParam<A>>;
15 impl<A> WithParam<A> for MyParam {}
19 impl WithAssoc for MyStruct {
20 type AssocType = MyParam;
24 fn my_fun<A>() -> Return<A> {
28 fn my_other_fn<A>() -> impl WithAssoc<AssocType = impl WithParam<A>> {