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