]> git.proxmox.com Git - rustc.git/blob - tests/ui/associated-types/issue-37808.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / associated-types / issue-37808.rs
1 // check-pass
2
3 trait Parent {
4 type Ty;
5 type Assoc: Child<Self::Ty>;
6 }
7
8 trait Child<T> {}
9
10 struct ChildWrapper<T>(T);
11 impl<A, T> Child<A> for ChildWrapper<T> where T: Child<A> {}
12
13 struct ParentWrapper<T>(T);
14 impl<A, T: Parent<Ty = A>> Parent for ParentWrapper<T> {
15 type Ty = A;
16 type Assoc = ChildWrapper<T::Assoc>;
17 }
18
19 fn main() {}