]>
Commit | Line | Data |
---|---|---|
e74abb32 XL |
1 | // check-pass |
2 | // Regression test for issue #63677 - ensure that | |
3 | // coherence checking can properly handle 'impl trait' | |
4 | // in type aliases | |
94222f64 | 5 | #![feature(type_alias_impl_trait)] |
e74abb32 XL |
6 | |
7 | pub trait Trait {} | |
8 | pub struct S1<T>(T); | |
9 | pub struct S2<T>(T); | |
10 | ||
11 | pub type T1 = impl Trait; | |
12 | pub type T2 = S1<T1>; | |
13 | pub type T3 = S2<T2>; | |
14 | ||
15 | impl<T> Trait for S1<T> {} | |
16 | impl<T: Trait> S2<T> {} | |
17 | impl T3 {} | |
18 | ||
19 | pub fn use_t1() -> T1 { S1(()) } | |
20 | ||
21 | fn main() {} |