2018-08-08 07:28:26 -05:00
|
|
|
error[E0597]: `a` does not live long enough
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/regions-addr-of-arg.rs:5:31
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let _p: &'static isize = &a;
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^ borrowed value does not live long enough
|
|
|
|
LL | }
|
|
|
|
| - borrowed value only lives until here
|
|
|
|
|
|
|
|
|
= note: borrowed value must be valid for the static lifetime...
|
|
|
|
|
|
|
|
error[E0597]: `a` does not live long enough
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/regions-addr-of-arg.rs:13:6
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | &a
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^ borrowed value does not live long enough
|
|
|
|
LL | }
|
|
|
|
| - borrowed value only lives until here
|
|
|
|
|
|
2018-12-25 09:56:47 -06:00
|
|
|
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 12:8...
|
|
|
|
--> $DIR/regions-addr-of-arg.rs:12:8
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn zed<'a>(a: isize) -> &'a isize {
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0597`.
|