]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/reassignment_immutable_fields_overlapping.nll.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / borrowck / reassignment_immutable_fields_overlapping.nll.stderr
1 error[E0594]: cannot assign to `x.a`, as `x` is not declared as mutable
2   --> $DIR/reassignment_immutable_fields_overlapping.rs:22:5
3    |
4 LL |     let x: Foo;
5    |         - help: consider changing this to be mutable: `mut x`
6 LL |     x.a = 1;  //~ ERROR
7    |     ^^^^^^^ cannot assign
8
9 error[E0594]: cannot assign to `x.b`, as `x` is not declared as mutable
10   --> $DIR/reassignment_immutable_fields_overlapping.rs:23:5
11    |
12 LL |     let x: Foo;
13    |         - help: consider changing this to be mutable: `mut x`
14 LL |     x.a = 1;  //~ ERROR
15 LL |     x.b = 22; //~ ERROR
16    |     ^^^^^^^^ cannot assign
17
18 error: aborting due to 2 previous errors
19
20 For more information about this error, try `rustc --explain E0594`.