LL | Box::new(|| x) //~ ERROR cannot move out of captured outer variable
| ^ cannot move out of captured variable in an `Fn` closure
-error: aborting due to previous error
+error[E0507]: cannot move out of `x`, as it is a captured variable in a `Fn` closure
+ --> $DIR/borrowck-in-static.rs:15:17
+ |
+LL | Box::new(|| x) //~ ERROR cannot move out of captured outer variable
+ | ^
+ | |
+ | cannot move out of `x`, as it is a captured variable in a `Fn` closure
+ | cannot move
+ |
+help: consider changing this to accept closures that implement `FnMut`
+ --> $DIR/borrowck-in-static.rs:15:14
+ |
+LL | Box::new(|| x) //~ ERROR cannot move out of captured outer variable
+ | ^^^^
+
+error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0507`.