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
586 B19 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
19For more information about this error, try `rustc --explain E0594`.