]> git.proxmox.com Git - rustc.git/blob - src/test/ui/type-alias-impl-trait/issue-57807-associated-type.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / issue-57807-associated-type.rs
1 // Regression test for issue #57807 - ensure
2 // that we properly unify associated types within
3 // a type alias impl trait
4 // check-pass
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 trait Bar {
11 type A;
12 }
13
14 impl Bar for () {
15 type A = ();
16 }
17
18 trait Foo {
19 type A;
20 type B: Bar<A = Self::A>;
21
22 fn foo() -> Self::B;
23 }
24
25 impl Foo for () {
26 type A = ();
27 type B = impl Bar<A = Self::A>;
28
29 fn foo() -> Self::B {
30 ()
31 }
32 }
33
34 fn main() {}