]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/unsatified-item-lifetime-bound.rs
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[rust.git] / src / test / ui / generic-associated-types / unsatified-item-lifetime-bound.rs
1 #![feature(generic_associated_types)]
2
3 pub trait X {
4     type Y<'a: 'static>;
5     //~^ WARNING unnecessary lifetime parameter
6 }
7
8 impl X for () {
9     type Y<'a> = &'a ();
10 }
11
12 struct B<'a, T: for<'r> X<Y<'r> = &'r ()>> {
13     f: <T as X>::Y<'a>,
14     //~^ ERROR lifetime bound not satisfied
15 }
16
17 struct C<'a, T: X> {
18     f: <T as X>::Y<'a>,
19     //~^ ERROR lifetime bound not satisfied
20 }
21
22 struct D<'a> {
23     f: <() as X>::Y<'a>,
24     //~^ ERROR lifetime bound not satisfied
25 }
26
27 fn main() {}