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 
main()27 fn main() {}
28