1 error[E0596]: cannot borrow `callback` as mutable, as it is not declared as mutable
2 --> $DIR/issue-80313-mutation-in-closure.rs:6:5
4 LL | let callback = || {
5 | -------- help: consider changing this to be mutable: `mut callback`
7 | ------ calling `callback` requires mutable binding due to mutable borrow of `my_var`
10 | ^^^^^^^^ cannot borrow as mutable
12 error: aborting due to previous error
14 For more information about this error, try `rustc --explain E0596`.