]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-76407.rs
Rollup merge of #104024 - noeddl:unused-must-use, r=compiler-errors
[rust.git] / src / test / ui / generic-associated-types / issue-76407.rs
1 // check-pass
2
3 trait Marker {}
4
5 impl Marker for u32 {}
6
7 trait MyTrait {
8     type Item<'a>;
9 }
10
11 struct MyStruct;
12
13 impl MyTrait for MyStruct {
14     type Item<'a> = u32;
15 }
16
17 fn ty_check<T>()
18 where
19     T: MyTrait,
20     for<'a> T::Item<'a>: Marker
21 {}
22
23 fn main() {
24     ty_check::<MyStruct>();
25 }