]> git.lizzy.rs Git - rust.git/blob - tests/ui/higher-rank-trait-bounds/complex.rs
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco
[rust.git] / tests / ui / higher-rank-trait-bounds / complex.rs
1 // check-pass
2
3 trait A<'a> {}
4 trait B<'b> {}
5 fn foo<T>() where for<'a> T: A<'a> + 'a {}
6 trait C<'c>: for<'a> A<'a> + for<'b> B<'b> {
7     type As;
8 }
9 struct D<T> where T: for<'c> C<'c, As=&'c ()> {
10     t: std::marker::PhantomData<T>,
11 }
12 trait E<'e, 'g> {
13     type As;
14 }
15 trait F<'f>: for<'a> A<'a> + for<'e> E<'e, 'f> {}
16 struct G<T> where T: for<'f> F<'f, As=&'f ()> {
17     t: std::marker::PhantomData<T>,
18 }
19 trait H<'a, 'b> {
20     type As;
21 }
22 trait I<'a>: for<'b> H<'a, 'b> {}
23
24 struct J<T> where T: for<'i> I<'i, As=&'i ()> {
25     t: std::marker::PhantomData<T>,
26 }
27
28 fn main() {}