]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/missing-assoc-type-bound-restriction.rs
Rollup merge of #99079 - compiler-errors:issue-99073, r=oli-obk
[rust.git] / src / test / ui / suggestions / missing-assoc-type-bound-restriction.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
12 impl<A, T> Child<A> for ChildWrapper<T> where T: Child<A> {}
13
14 struct ParentWrapper<T>(T);
15
16 impl<A, T: Parent<Ty = A>> Parent for ParentWrapper<T> {
17     type Ty = A;
18     type Assoc = ChildWrapper<T::Assoc>;
19 }
20
21 fn main() {}