fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
494 B15 linesraw
1error[E0594]: cannot assign to `x`, as it is a captured variable in a `Fn` closure
2  --> $DIR/fn-closure-mutable-capture.rs:5:17
3   |
4LL |     bar(move || x = 1);
5   |                 ^^^^^ cannot assign
6   |
7help: consider changing this to accept closures that implement `FnMut`
8  --> $DIR/fn-closure-mutable-capture.rs:5:9
9   |
10LL |     bar(move || x = 1);
11   |         ^^^^^^^^^^^^^
12
13error: aborting due to previous error
14
15For more information about this error, try `rustc --explain E0594`.