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