rust/src/test/ui/regions/regions-free-region-ordering-caller1.stderr

34 lines
1.1 KiB
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0597]: borrowed value does not live long enough
--> $DIR/regions-free-region-ordering-caller1.rs:19:27
|
LL | let z: &'a & usize = &(&y);
| ^^^^ temporary value does not live long enough
...
LL | }
| - temporary value only lives until here
|
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 15:10...
--> $DIR/regions-free-region-ordering-caller1.rs:15:10
|
LL | fn call1<'a>(x: &'a usize) {
| ^^
error[E0597]: `y` does not live long enough
--> $DIR/regions-free-region-ordering-caller1.rs:19:29
|
LL | let z: &'a & usize = &(&y);
| ^ borrowed value does not live long enough
...
LL | }
| - borrowed value only lives until here
|
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 15:10...
--> $DIR/regions-free-region-ordering-caller1.rs:15:10
|
LL | fn call1<'a>(x: &'a usize) {
| ^^
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0597`.