]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/construct_with_other_type.rs
Auto merge of #106143 - matthiaskrgr:rollup-3kpy1dc, r=matthiaskrgr
[rust.git] / src / test / ui / generic-associated-types / construct_with_other_type.rs
1 // check-pass
2
3 use std::ops::Deref;
4
5 trait Foo {
6     type Bar<'a, 'b>;
7 }
8
9 trait Baz {
10     type Quux<'a>: Foo where Self: 'a;
11
12     // This weird type tests that we can use universal function call syntax to access the Item on
13     type Baa<'a>: Deref<Target = <Self::Quux<'a> as Foo>::Bar<'a, 'static>>  where Self: 'a;
14 }
15
16 impl<T> Baz for T where T: Foo {
17     type Quux<'a> = T where T: 'a;
18
19     type Baa<'a> = &'a <T as Foo>::Bar<'a, 'static> where T: 'a;
20 }
21
22 fn main() {}