1 error[E0594]: cannot assign to `x`, as it is not declared as mutable
2 --> $DIR/unboxed-closure-immutable-capture.rs:19:13
5 | - help: consider changing this to be mutable: `mut x`
6 LL | move || x = 1; //~ ERROR cannot assign
9 error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
10 --> $DIR/unboxed-closure-immutable-capture.rs:20:17
13 | - help: consider changing this to be mutable: `mut x`
14 LL | move || x = 1; //~ ERROR cannot assign
15 LL | move || set(&mut x); //~ ERROR cannot borrow
16 | ^^^^^^ cannot borrow as mutable
18 error[E0594]: cannot assign to `x`, as it is not declared as mutable
19 --> $DIR/unboxed-closure-immutable-capture.rs:21:13
22 | - help: consider changing this to be mutable: `mut x`
24 LL | move || x = 1; //~ ERROR cannot assign
27 error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
28 --> $DIR/unboxed-closure-immutable-capture.rs:22:17
31 | - help: consider changing this to be mutable: `mut x`
33 LL | move || set(&mut x); //~ ERROR cannot borrow
34 | ^^^^^^ cannot borrow as mutable
36 warning[E0594]: cannot assign to `x`, as it is not declared as mutable
37 --> $DIR/unboxed-closure-immutable-capture.rs:23:8
40 | - help: consider changing this to be mutable: `mut x`
42 LL | || x = 1; //~ ERROR cannot assign
45 = warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
46 It represents potential unsoundness in your code.
47 This warning will become a hard error in the future.
49 warning[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
50 --> $DIR/unboxed-closure-immutable-capture.rs:25:12
53 | - help: consider changing this to be mutable: `mut x`
55 LL | || set(&mut x); //~ ERROR cannot assign
56 | ^^^^^^ cannot borrow as mutable
58 = warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
59 It represents potential unsoundness in your code.
60 This warning will become a hard error in the future.
62 warning[E0594]: cannot assign to `x`, as it is not declared as mutable
63 --> $DIR/unboxed-closure-immutable-capture.rs:26:8
66 | - help: consider changing this to be mutable: `mut x`
68 LL | || x = 1; //~ ERROR cannot assign
71 = warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
72 It represents potential unsoundness in your code.
73 This warning will become a hard error in the future.
75 warning[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
76 --> $DIR/unboxed-closure-immutable-capture.rs:28:12
79 | - help: consider changing this to be mutable: `mut x`
81 LL | || set(&mut x); //~ ERROR cannot assign
82 | ^^^^^^ cannot borrow as mutable
84 = warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
85 It represents potential unsoundness in your code.
86 This warning will become a hard error in the future.
88 error: aborting due to 4 previous errors
90 Some errors occurred: E0594, E0596.
91 For more information about an error, try `rustc --explain E0594`.