2021-03-17 01:51:27 -05:00
|
|
|
error[E0594]: cannot assign to `z.0.0.0`, as it is not declared as mutable
|
2021-06-27 01:22:46 -05:00
|
|
|
--> $DIR/cant-mutate-imm.rs:12:9
|
2020-12-12 23:11:15 -06:00
|
|
|
|
|
|
|
|
LL | let z = (y, 10);
|
|
|
|
| - help: consider changing this to be mutable: `mut z`
|
|
|
|
...
|
|
|
|
LL | z.0.0.0 = 20;
|
|
|
|
| ^^^^^^^^^^^^ cannot assign
|
|
|
|
|
2021-03-17 01:51:27 -05:00
|
|
|
error[E0594]: cannot assign to `*bx.0`, as it is not declared as mutable
|
2021-06-27 01:22:46 -05:00
|
|
|
--> $DIR/cant-mutate-imm.rs:24:9
|
2020-12-12 23:11:15 -06:00
|
|
|
|
|
|
|
|
LL | let bx = Box::new(x);
|
|
|
|
| -- help: consider changing this to be mutable: `mut bx`
|
|
|
|
...
|
|
|
|
LL | bx.0 = 20;
|
|
|
|
| ^^^^^^^^^ cannot assign
|
|
|
|
|
2021-06-27 01:22:46 -05:00
|
|
|
error: aborting due to 2 previous errors
|
2020-12-12 23:11:15 -06:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0594`.
|