blob: 1098c16aaf63f8f6be3cec176313465f1e0f656d [file] [log] [blame]
error[E0594]: cannot assign to immutable captured outer variable in an `FnOnce` closure `x`
--> $DIR/cannot-mutate-captured-non-mut-var.rs:13:25
|
LL | to_fn_once(move|| { x = 2; });
| ^^^^^
error[E0596]: cannot borrow immutable captured outer variable in an `FnOnce` closure `s` as mutable
--> $DIR/cannot-mutate-captured-non-mut-var.rs:18:25
|
LL | to_fn_once(move|| { s.read_to_end(&mut Vec::new()); });
| ^
error: aborting due to 2 previous errors
Some errors occurred: E0594, E0596.
For more information about an error, try `rustc --explain E0594`.