]> git.proxmox.com Git - rustc.git/blob - src/test/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.rs
62d11ad38d62d8d3022117a4b5bcc0fe04a1d74e
[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 // revisions: min_tait full_tait
6 #![feature(min_type_alias_impl_trait)]
7 #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
8 //[full_tait]~^ WARN incomplete
9
10 pub trait Trait {}
11 pub struct S1<T>(T);
12 pub struct S2<T>(T);
13
14 pub type T1 = impl Trait;
15 pub type T2 = S1<T1>;
16 pub type T3 = S2<T2>;
17
18 impl<T> Trait for S1<T> {}
19 impl<T: Trait> S2<T> {}
20 impl T3 {}
21
22 pub fn use_t1() -> T1 { S1(()) }
23
24 fn main() {}