61 lines
1.9 KiB
Plaintext
61 lines
1.9 KiB
Plaintext
warning: not reporting region error due to nll
|
|
--> $DIR/regions-nested-fns.rs:24:27
|
|
|
|
|
LL | if false { return x; } //~ ERROR E0312
|
|
| ^
|
|
|
|
warning: not reporting region error due to nll
|
|
--> $DIR/regions-nested-fns.rs:15:18
|
|
|
|
|
LL | let mut ay = &y; //~ ERROR E0495
|
|
| ^^
|
|
|
|
error: unsatisfied lifetime constraints
|
|
--> $DIR/regions-nested-fns.rs:20:9
|
|
|
|
|
LL | let mut ay = &y; //~ ERROR E0495
|
|
| ------ lifetime `'2` appears in the type of `ay`
|
|
LL |
|
|
LL | ignore::<Box<for<'z> FnMut(&'z isize)>>(Box::new(|z| {
|
|
| - has type `&'1 isize`
|
|
...
|
|
LL | ay = z;
|
|
| ^^^^^^ requires that `'1` must outlive `'2`
|
|
|
|
error: unsatisfied lifetime constraints
|
|
--> $DIR/regions-nested-fns.rs:14:9
|
|
|
|
|
LL | fn nested<'x>(x: &'x isize) {
|
|
| -- lifetime `'x` defined here
|
|
LL | let y = 3;
|
|
| ^ requires that `'x` must outlive `'static`
|
|
|
|
error[E0597]: `y` does not live long enough
|
|
--> $DIR/regions-nested-fns.rs:15:18
|
|
|
|
|
LL | let mut ay = &y; //~ ERROR E0495
|
|
| ^^ borrowed value does not live long enough
|
|
...
|
|
LL | }
|
|
| - `y` dropped here while still borrowed
|
|
|
|
|
= note: borrowed value must be valid for the static lifetime...
|
|
|
|
error[E0597]: `y` does not live long enough
|
|
--> $DIR/regions-nested-fns.rs:19:15
|
|
|
|
|
LL | ignore::<Box<for<'z> FnMut(&'z isize)>>(Box::new(|z| {
|
|
| --- value captured here
|
|
LL | ay = x;
|
|
LL | ay = &y;
|
|
| ^ borrowed value does not live long enough
|
|
...
|
|
LL | }
|
|
| - `y` dropped here while still borrowed
|
|
|
|
|
= note: borrowed value must be valid for the static lifetime...
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0597`.
|