1error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement
2  --> $DIR/projection-type-lifetime-mismatch.rs:17:7
3   |
4LL | fn f(x: &impl for<'a> X<Y<'a> = &'a ()>) -> &'static () {
5   |         ------------------------------- this data with an anonymous lifetime `'_`...
6LL |     x.m()
7   |     --^-- ...is captured and required to live as long as `'static` here
8
9error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement
10  --> $DIR/projection-type-lifetime-mismatch.rs:22:7
11   |
12LL | fn g<T: for<'a> X<Y<'a> = &'a ()>>(x: &T) -> &'static () {
13   |                                       -- this data with an anonymous lifetime `'_`...
14LL |     x.m()
15   |     --^-- ...is captured and required to live as long as `'static` here
16
17error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement
18  --> $DIR/projection-type-lifetime-mismatch.rs:27:7
19   |
20LL | fn h(x: &()) -> &'static () {
21   |         --- this data with an anonymous lifetime `'_`...
22LL |     x.m()
23   |     --^-- ...is captured and required to live as long as `'static` here
24
25error: aborting due to 3 previous errors
26
27For more information about this error, try `rustc --explain E0759`.
28