1 error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference
2 --> $DIR/borrowck-closures-mut-of-imm.rs:9:25
4 LL | let mut c1 = || set(&mut *x);
5 | ^^^^^^^ cannot borrow as mutable
7 error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference
8 --> $DIR/borrowck-closures-mut-of-imm.rs:11:25
10 LL | let mut c2 = || set(&mut *x);
11 | ^^^^^^^ cannot borrow as mutable
13 error[E0524]: two closures require unique access to `x` at the same time
14 --> $DIR/borrowck-closures-mut-of-imm.rs:11:18
16 LL | let mut c1 = || set(&mut *x);
17 | -- -- first borrow occurs due to use of `x` in closure
19 | first closure is constructed here
21 LL | let mut c2 = || set(&mut *x);
22 | ^^ -- second borrow occurs due to use of `x` in closure
24 | second closure is constructed here
27 | -- first borrow later used here
29 error: aborting due to 3 previous errors
31 Some errors have detailed explanations: E0524, E0596.
32 For more information about an error, try `rustc --explain E0524`.