fork/rust

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

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
518 B18 linesraw
1error[E0594]: cannot assign to `counter`, as it is a captured variable in a `Fn` closure
2  --> $DIR/unboxed-closures-mutated-upvar-from-fn-closure.rs:11:9
3   |
4LL |         counter += 1;
5   |         ^^^^^^^^^^^^ cannot assign
6   |
7help: consider changing this to accept closures that implement `FnMut`
8  --> $DIR/unboxed-closures-mutated-upvar-from-fn-closure.rs:10:10
9   |
10LL |       call(|| {
11   |  __________^
12LL | |         counter += 1;
13LL | |
14LL | |     });
15   | |_____^
16
17error: aborting due to previous error
18