2017-10-11 21:38:52 +00:00
|
|
|
error[E0594]: cannot assign to captured outer variable in an `FnMut` closure
|
2018-05-03 18:26:58 +00:00
|
|
|
--> $DIR/closure-immutable-outer-variable.rs:21:26
|
2017-10-11 21:38:52 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | let y = true;
|
2017-10-11 21:38:52 +00:00
|
|
|
| - help: consider making `y` mutable: `mut y`
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | foo(Box::new(move || y = false) as Box<_>); //~ ERROR cannot assign to captured outer variable
|
2017-10-11 21:38:52 +00:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2018-03-03 14:59:40 +00:00
|
|
|
For more information about this error, try `rustc --explain E0594`.
|