539404b77d
This commit updates the test output for the updated NLL compare mode that uses `-Z borrowck=migrate` rather than `-Z borrowck=mir`. The previous commit changes `compiletest` and this commit only updates `.nll.stderr` files.
39 lines
1.2 KiB
Plaintext
39 lines
1.2 KiB
Plaintext
error[E0507]: cannot move out of captured variable in an `FnMut` closure
|
|
--> $DIR/issue-4335.rs:16:20
|
|
|
|
|
LL | fn f<'r, T>(v: &'r T) -> Box<FnMut() -> T + 'r> {
|
|
| - captured outer variable
|
|
LL | id(Box::new(|| *v))
|
|
| ^^ cannot move out of captured variable in an `FnMut` closure
|
|
|
|
error[E0507]: cannot move out of `*v` which is behind a `&` reference
|
|
--> $DIR/issue-4335.rs:16:20
|
|
|
|
|
LL | id(Box::new(|| *v))
|
|
| ^^
|
|
| |
|
|
| cannot move out of `*v` which is behind a `&` reference
|
|
| cannot move
|
|
|
|
error[E0597]: `v` does not live long enough
|
|
--> $DIR/issue-4335.rs:16:21
|
|
|
|
|
LL | id(Box::new(|| *v))
|
|
| -- ^ borrowed value does not live long enough
|
|
| |
|
|
| value captured here
|
|
...
|
|
LL | }
|
|
| - `v` dropped here while still borrowed
|
|
|
|
|
note: borrowed value must be valid for the lifetime 'r as defined on the function body at 15:6...
|
|
--> $DIR/issue-4335.rs:15:6
|
|
|
|
|
LL | fn f<'r, T>(v: &'r T) -> Box<FnMut() -> T + 'r> {
|
|
| ^^
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
Some errors occurred: E0507, E0597.
|
|
For more information about an error, try `rustc --explain E0507`.
|