]>
Commit | Line | Data |
---|---|---|
6a06907d XL |
1 | error[E0621]: explicit lifetime required in the type of `x` |
2 | --> $DIR/projection-type-lifetime-mismatch.rs:18:5 | |
3 | | | |
4 | LL | fn f(x: &impl for<'a> X<Y<'a> = &'a ()>) -> &'static () { | |
5 | | ------------------------------- help: add explicit lifetime `'static` to the type of `x`: `&'static impl for<'a> X<Y<'a> = &'a ()>` | |
6 | LL | x.m() | |
7 | | ^^^^^ lifetime `'static` required | |
8 | ||
9 | error[E0621]: explicit lifetime required in the type of `x` | |
10 | --> $DIR/projection-type-lifetime-mismatch.rs:23:5 | |
11 | | | |
12 | LL | fn g<T: for<'a> X<Y<'a> = &'a ()>>(x: &T) -> &'static () { | |
13 | | -- help: add explicit lifetime `'static` to the type of `x`: `&'static T` | |
14 | LL | x.m() | |
15 | | ^^^^^ lifetime `'static` required | |
16 | ||
17 | error[E0621]: explicit lifetime required in the type of `x` | |
18 | --> $DIR/projection-type-lifetime-mismatch.rs:28:5 | |
19 | | | |
20 | LL | fn h(x: &()) -> &'static () { | |
21 | | --- help: add explicit lifetime `'static` to the type of `x`: `&'static ()` | |
22 | LL | x.m() | |
23 | | ^^^^^ lifetime `'static` required | |
24 | ||
25 | error: aborting due to 3 previous errors | |
26 | ||
27 | For more information about this error, try `rustc --explain E0621`. |