fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
549 B16 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 | fn call<F>(f: F) where F : Fn() {
5   |               - change this to accept `FnMut` instead of `Fn`
6...
7LL |     call(|| {
8   |     ---- -- in this closure
9   |     |
10   |     expects `Fn` instead of `FnMut`
11LL |         counter += 1;
12   |         ^^^^^^^^^^^^ cannot assign
13
14error: aborting due to previous error
15
16For more information about this error, try `rustc --explain E0594`.