fork/rust
git clone https://git.julia.blue/fork/rust
8d69840ab92
1.43.1
1error[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 | 4LL | pub fn bar<F: Fn()>(_f: F) {} 5 | - change this to accept `FnMut` instead of `Fn` 6... 7LL | bar(move || x = 1); 8 | --- ^^^^^ cannot assign 9 | | 10 | expects `Fn` instead of `FnMut` 11 12error: aborting due to previous error 13 14For more information about this error, try `rustc --explain E0594`.