]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0597]: `a` does not live long enough |
0731742a | 2 | --> $DIR/regions-addr-of-arg.rs:5:31 |
b7449926 | 3 | | |
532ac7d7 | 4 | LL | let _p: &'static isize = &a; |
b7449926 XL |
5 | | ^ borrowed value does not live long enough |
6 | LL | } | |
7 | | - borrowed value only lives until here | |
8 | | | |
9 | = note: borrowed value must be valid for the static lifetime... | |
10 | ||
11 | error[E0597]: `a` does not live long enough | |
0731742a | 12 | --> $DIR/regions-addr-of-arg.rs:13:6 |
b7449926 | 13 | | |
532ac7d7 | 14 | LL | &a |
b7449926 XL |
15 | | ^ borrowed value does not live long enough |
16 | LL | } | |
17 | | - borrowed value only lives until here | |
18 | | | |
0731742a XL |
19 | note: borrowed value must be valid for the lifetime 'a as defined on the function body at 12:8... |
20 | --> $DIR/regions-addr-of-arg.rs:12:8 | |
b7449926 XL |
21 | | |
22 | LL | fn zed<'a>(a: isize) -> &'a isize { | |
23 | | ^^ | |
24 | ||
25 | error: aborting due to 2 previous errors | |
26 | ||
27 | For more information about this error, try `rustc --explain E0597`. |