]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-type-bounds/issue-83017.rs
Auto merge of #93718 - thomcc:used-macho, r=pnkfelix
[rust.git] / src / test / ui / associated-type-bounds / issue-83017.rs
1 // check-pass
2
3 #![feature(associated_type_bounds)]
4
5 trait TraitA<'a> {
6     type AsA;
7 }
8
9 trait TraitB<'a, 'b> {
10     type AsB;
11 }
12
13 trait TraitC<'a, 'b, 'c> {}
14
15 struct X;
16
17 impl<'a, 'b, 'c> TraitC<'a, 'b, 'c> for X {}
18
19 struct Y;
20
21 impl<'a, 'b> TraitB<'a, 'b> for Y {
22     type AsB = X;
23 }
24
25 struct Z;
26
27 impl<'a> TraitA<'a> for Z {
28     type AsA = Y;
29 }
30
31 fn foo<T>()
32 where
33     for<'a> T: TraitA<'a, AsA: for<'b> TraitB<'a, 'b, AsB: for<'c> TraitC<'a, 'b, 'c>>>,
34 {
35 }
36
37 fn main() {
38     foo::<Z>();
39 }