]>
Commit | Line | Data |
---|---|---|
74b04a01 XL |
1 | // check-pass |
2 | // Regression test for issue #67844 | |
3 | // Ensures that we properly handle nested TAIT occurrences | |
4 | // with generic parameters | |
5 | ||
6a06907d XL |
6 | // revisions: min_tait full_tait |
7 | #![feature(min_type_alias_impl_trait)] | |
8 | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] | |
9 | //[full_tait]~^ WARN incomplete | |
74b04a01 XL |
10 | |
11 | trait WithAssoc { type AssocType; } | |
12 | ||
13 | trait WithParam<A> {} | |
14 | ||
15 | type Return<A> = impl WithAssoc<AssocType = impl WithParam<A>>; | |
16 | ||
17 | struct MyParam; | |
18 | impl<A> WithParam<A> for MyParam {} | |
19 | ||
20 | struct MyStruct; | |
21 | ||
22 | impl WithAssoc for MyStruct { | |
23 | type AssocType = MyParam; | |
24 | } | |
25 | ||
26 | ||
27 | fn my_fun<A>() -> Return<A> { | |
28 | MyStruct | |
29 | } | |
30 | ||
31 | fn my_other_fn<A>() -> impl WithAssoc<AssocType = impl WithParam<A>> { | |
32 | MyStruct | |
33 | } | |
34 | ||
35 | fn main() {} |