]> git.proxmox.com Git - rustc.git/blob - src/test/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.rs
Update upstream source from tag 'upstream/1.56.0_beta.4+dfsg1'
[rustc.git] / src / test / ui / type-alias-impl-trait / issue-63677-type-alias-coherence.rs
1 // check-pass
2 // Regression test for issue #63677 - ensure that
3 // coherence checking can properly handle 'impl trait'
4 // in type aliases
5 #![feature(type_alias_impl_trait)]
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() {}