]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/issue-57807-associated-type.rs
Rollup merge of #92715 - chordtoll:empty-string, r=davidtwco
[rust.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 #![feature(type_alias_impl_trait)]
6
7 trait Bar {
8     type A;
9 }
10
11 impl Bar for () {
12     type A = ();
13 }
14
15 trait Foo {
16     type A;
17     type B: Bar<A = Self::A>;
18
19     fn foo() -> Self::B;
20 }
21
22 impl Foo for () {
23     type A = ();
24     type B = impl Bar<A = Self::A>;
25
26     fn foo() -> Self::B {
27         ()
28     }
29 }
30
31 fn main() {}