fork/rust

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

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

master
565 B17 linesraw
1error[E0596]: cannot borrow `callback` as mutable, as it is not declared as mutable
2  --> $DIR/issue-80313-mutation-in-move-closure.rs:6:5
3   |
4LL |         my_var = true;
5   |         ------ calling `callback` requires mutable binding due to possible mutation of `my_var`
6LL |     };
7LL |     callback();
8   |     ^^^^^^^^ cannot borrow as mutable
9   |
10help: consider changing this to be mutable
11   |
12LL |     let mut callback = move || {
13   |         +++
14
15error: aborting due to previous error
16
17For more information about this error, try `rustc --explain E0596`.