]> git.proxmox.com Git - rustc.git/blame - src/test/ui/borrowck/borrowck-in-static.nll.stderr
New upstream version 1.31.0~beta.4+dfsg1
[rustc.git] / src / test / ui / borrowck / borrowck-in-static.nll.stderr
CommitLineData
8faf50e0 1error[E0507]: cannot move out of captured variable in an `Fn` closure
83c7162d
XL
2 --> $DIR/borrowck-in-static.rs:15:17
3 |
b7449926
XL
4LL | let x = Box::new(0);
5 | - captured outer variable
83c7162d 6LL | Box::new(|| x) //~ ERROR cannot move out of captured outer variable
8faf50e0 7 | ^ cannot move out of captured variable in an `Fn` closure
83c7162d 8
0bf4aa26
XL
9error[E0507]: cannot move out of `x`, as it is a captured variable in a `Fn` closure
10 --> $DIR/borrowck-in-static.rs:15:17
11 |
12LL | Box::new(|| x) //~ ERROR cannot move out of captured outer variable
13 | ^
14 | |
15 | cannot move out of `x`, as it is a captured variable in a `Fn` closure
16 | cannot move
17 |
18help: consider changing this to accept closures that implement `FnMut`
19 --> $DIR/borrowck-in-static.rs:15:14
20 |
21LL | Box::new(|| x) //~ ERROR cannot move out of captured outer variable
22 | ^^^^
23
24error: aborting due to 2 previous errors
83c7162d
XL
25
26For more information about this error, try `rustc --explain E0507`.