]> git.proxmox.com Git - rustc.git/blob - src/test/ui/fn/fn-closure-mutable-capture.stderr
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / fn / fn-closure-mutable-capture.stderr
1 error[E0594]: cannot assign to `x`, as it is a captured variable in a `Fn` closure
2 --> $DIR/fn-closure-mutable-capture.rs:5:17
3 |
4 LL | pub fn bar<F: Fn()>(_f: F) {}
5 | - change this to accept `FnMut` instead of `Fn`
6 ...
7 LL | bar(move || x = 1);
8 | --- ^^^^^ cannot assign
9 | |
10 | expects `Fn` instead of `FnMut`
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0594`.