blob: 293f59ff4b27ad638c6b8dbb07d2529698756576 [file] [log] [blame]
error[E0387]: cannot assign to data in a captured outer variable in an `Fn` closure
--> $DIR/unboxed-closures-mutated-upvar-from-fn-closure.rs:14:9
|
LL | counter += 1;
| ^^^^^^^^^^^^
|
help: consider changing this closure to take self by mutable reference
--> $DIR/unboxed-closures-mutated-upvar-from-fn-closure.rs:13:10
|
LL | call(|| {
| __________^
LL | | counter += 1;
LL | | //[ast]~^ ERROR cannot assign to data in a captured outer variable in an `Fn` closure
LL | | //[mir]~^^ ERROR cannot assign to `counter`
LL | | });
| |_____^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0387`.