1 error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure
2 --> $DIR/issue-21600.rs:24:20
4 LL | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer
5 | ^ cannot borrow as mutable
7 help: consider changing this to accept closures that implement `FnMut`
8 --> $DIR/issue-21600.rs:24:17
10 LL | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer
13 error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure
14 --> $DIR/issue-21600.rs:24:17
16 LL | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer
17 | ^^ - mutable borrow occurs due to use of `x` in closure
19 | cannot borrow as mutable
21 help: consider changing this to accept closures that implement `FnMut`
22 --> $DIR/issue-21600.rs:22:13
26 LL | | call_it(|| x.gen());
27 LL | | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer
28 LL | | //~^ ERROR cannot borrow data mutably in a captured outer
32 error: aborting due to 2 previous errors
34 For more information about this error, try `rustc --explain E0596`.