fork/rust

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

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
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`.