1error[E0594]: cannot assign to `x`, as it is not declared as mutable 2 --> $DIR/unboxed-closure-immutable-capture.rs:9:13 3 | 4LL | let x = 0; 5 | - help: consider changing this to be mutable: `mut x` 6LL | move || x = 1; 7 | ^^^^^ cannot assign 8 9error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable 10 --> $DIR/unboxed-closure-immutable-capture.rs:10:17 11 | 12LL | let x = 0; 13 | - help: consider changing this to be mutable: `mut x` 14LL | move || x = 1; 15LL | move || set(&mut x); 16 | ^^^^^^ cannot borrow as mutable 17 18error[E0594]: cannot assign to `x`, as it is not declared as mutable 19 --> $DIR/unboxed-closure-immutable-capture.rs:11:13 20 | 21LL | let x = 0; 22 | - help: consider changing this to be mutable: `mut x` 23... 24LL | move || x = 1; 25 | ^^^^^ cannot assign 26 27error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable 28 --> $DIR/unboxed-closure-immutable-capture.rs:12:17 29 | 30LL | let x = 0; 31 | - help: consider changing this to be mutable: `mut x` 32... 33LL | move || set(&mut x); 34 | ^^^^^^ cannot borrow as mutable 35 36error[E0594]: cannot assign to `x`, as it is not declared as mutable 37 --> $DIR/unboxed-closure-immutable-capture.rs:13:8 38 | 39LL | let x = 0; 40 | - help: consider changing this to be mutable: `mut x` 41... 42LL | || x = 1; 43 | ^^^^^ cannot assign 44 45error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable 46 --> $DIR/unboxed-closure-immutable-capture.rs:14:12 47 | 48LL | let x = 0; 49 | - help: consider changing this to be mutable: `mut x` 50... 51LL | || set(&mut x); 52 | ^^^^^^ cannot borrow as mutable 53 54error[E0594]: cannot assign to `x`, as it is not declared as mutable 55 --> $DIR/unboxed-closure-immutable-capture.rs:15:8 56 | 57LL | let x = 0; 58 | - help: consider changing this to be mutable: `mut x` 59... 60LL | || x = 1; 61 | ^^^^^ cannot assign 62 63error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable 64 --> $DIR/unboxed-closure-immutable-capture.rs:16:12 65 | 66LL | let x = 0; 67 | - help: consider changing this to be mutable: `mut x` 68... 69LL | || set(&mut x); 70 | ^^^^^^ cannot borrow as mutable 71 72error: aborting due to 8 previous errors 73 74Some errors have detailed explanations: E0594, E0596. 75For more information about an error, try `rustc --explain E0594`. 76