error[E0621]: explicit lifetime required in the type of `x`
--> $DIR/projection-type-lifetime-mismatch.rs:18:5
|
-LL | fn f(x: &impl for<'a> X<Y<'a> = &'a ()>) -> &'static () {
- | ------------------------------- help: add explicit lifetime `'static` to the type of `x`: `&'static impl for<'a> X<Y<'a> = &'a ()>`
LL | x.m()
| ^^^^^ lifetime `'static` required
error[E0621]: explicit lifetime required in the type of `x`
--> $DIR/projection-type-lifetime-mismatch.rs:23:5
|
-LL | fn g<T: for<'a> X<Y<'a> = &'a ()>>(x: &T) -> &'static () {
- | -- help: add explicit lifetime `'static` to the type of `x`: `&'static T`
LL | x.m()
| ^^^^^ lifetime `'static` required
error[E0621]: explicit lifetime required in the type of `x`
--> $DIR/projection-type-lifetime-mismatch.rs:28:5
|
-LL | fn h(x: &()) -> &'static () {
- | --- help: add explicit lifetime `'static` to the type of `x`: `&'static ()`
LL | x.m()
| ^^^^^ lifetime `'static` required