summaryrefslogtreecommitdiffstats
path: root/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm.stderr
blob: 98414fa8a3d5f1dec4b2627653228008bcc6bccb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
error[E0594]: cannot assign to `z.0.0.0`, as it is not declared as mutable
  --> $DIR/cant-mutate-imm.rs:12:9
   |
LL |     let z = (y, 10);
   |         - help: consider changing this to be mutable: `mut z`
...
LL |         z.0.0.0 = 20;
   |         ^^^^^^^^^^^^ cannot assign

error[E0594]: cannot assign to `*bx.0`, as it is not declared as mutable
  --> $DIR/cant-mutate-imm.rs:24:9
   |
LL |     let bx = Box::new(x);
   |         -- help: consider changing this to be mutable: `mut bx`
...
LL |         bx.0 = 20;
   |         ^^^^^^^^^ cannot assign

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0594`.