fork/rust

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

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
426 B14 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