]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | warning: unnecessary lifetime parameter `'a` |
0731742a | 2 | --> $DIR/static-lifetime-bound.rs:1:6 |
b7449926 | 3 | | |
532ac7d7 | 4 | LL | fn f<'a: 'static>(_: &'a i32) {} |
b7449926 XL |
5 | | ^^^^^^^^^^^ |
6 | | | |
7 | = help: you can use the `'static` lifetime directly, in place of `'a` | |
8 | ||
9 | error[E0597]: `x` does not live long enough | |
0731742a | 10 | --> $DIR/static-lifetime-bound.rs:5:8 |
b7449926 | 11 | | |
532ac7d7 | 12 | LL | f(&x); |
b7449926 XL |
13 | | ^ borrowed value does not live long enough |
14 | LL | } | |
15 | | - borrowed value only lives until here | |
16 | | | |
17 | = note: borrowed value must be valid for the static lifetime... | |
18 | ||
19 | error: aborting due to previous error | |
20 | ||
21 | For more information about this error, try `rustc --explain E0597`. |