1 error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure
2 --> $DIR/issue-21600.rs:14:20
4 LL | fn call_it<F>(f: F) where F: Fn() { f(); }
5 | - change this to accept `FnMut` instead of `Fn`
7 LL | call_it(|| x.gen_mut());
8 | ------- ^^^^^^^^^^^ cannot borrow as mutable
10 | expects `Fn` instead of `FnMut`
12 error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure
13 --> $DIR/issue-21600.rs:14:17
15 LL | fn call_it<F>(f: F) where F: Fn() { f(); }
16 | - change this to accept `FnMut` instead of `Fn`
21 | | expects `Fn` instead of `FnMut`
22 LL | | call_it(|| x.gen());
23 LL | | call_it(|| x.gen_mut());
24 | | ^^ - mutable borrow occurs due to use of `x` in closure
26 | | cannot borrow as mutable
30 | |_____- in this closure
32 error: aborting due to 2 previous errors
34 For more information about this error, try `rustc --explain E0596`.