]> git.proxmox.com Git - rustc.git/blob - src/test/ui/suggestions/fn-closure-mutable-capture.stderr
New upstream version 1.28.0+dfsg1
[rustc.git] / src / test / ui / suggestions / fn-closure-mutable-capture.stderr
1 error[E0594]: cannot assign to captured outer variable in an `Fn` closure
2 --> $DIR/fn-closure-mutable-capture.rs:15:17
3 |
4 LL | bar(move || x = 1);
5 | ^^^^^
6 |
7 = note: `Fn` closures cannot capture their enclosing environment for modifications
8 help: consider changing this closure to take self by mutable reference
9 --> $DIR/fn-closure-mutable-capture.rs:15:9
10 |
11 LL | bar(move || x = 1);
12 | ^^^^^^^^^^^^^
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0594`.