]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/reassignment_immutable_fields_twice.nll.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / borrowck / reassignment_immutable_fields_twice.nll.stderr
1 error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable
2   --> $DIR/reassignment_immutable_fields_twice.rs:17:5
3    |
4 LL |     let x: (u32, u32);
5    |         - help: consider changing this to be mutable: `mut x`
6 LL |     x = (22, 44);
7 LL |     x.0 = 1; //~ ERROR
8    |     ^^^^^^^ cannot assign
9
10 error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable
11   --> $DIR/reassignment_immutable_fields_twice.rs:22:5
12    |
13 LL |     let x: (u32, u32);
14    |         - help: consider changing this to be mutable: `mut x`
15 LL |     x.0 = 1; //~ ERROR
16    |     ^^^^^^^ cannot assign
17
18 error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable
19   --> $DIR/reassignment_immutable_fields_twice.rs:23:5
20    |
21 LL |     let x: (u32, u32);
22    |         - help: consider changing this to be mutable: `mut x`
23 LL |     x.0 = 1; //~ ERROR
24 LL |     x.0 = 22; //~ ERROR
25    |     ^^^^^^^^ cannot assign
26
27 error[E0594]: cannot assign to `x.1`, as `x` is not declared as mutable
28   --> $DIR/reassignment_immutable_fields_twice.rs:24:5
29    |
30 LL |     let x: (u32, u32);
31    |         - help: consider changing this to be mutable: `mut x`
32 ...
33 LL |     x.1 = 44; //~ ERROR
34    |     ^^^^^^^^ cannot assign
35
36 error: aborting due to 4 previous errors
37
38 For more information about this error, try `rustc --explain E0594`.