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
4 LL | pub fn bar<F: Fn()>(_f: F) {}
5 | - change this to accept `FnMut` instead of `Fn`
7 LL | bar(move || x = 1);
8 | --- ^^^^^ cannot assign
10 | expects `Fn` instead of `FnMut`
12 error: aborting due to previous error
14 For more information about this error, try `rustc --explain E0594`.