]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/reassignment_immutable_fields_overlapping.stderr
Auto merge of #87284 - Aaron1011:remove-paren-special, r=petrochenkov
[rust.git] / src / test / ui / borrowck / reassignment_immutable_fields_overlapping.stderr
1 error[E0381]: assign to part of possibly-uninitialized variable: `x`
2   --> $DIR/reassignment_immutable_fields_overlapping.rs:12:5
3    |
4 LL |     x.a = 1;
5    |     ^^^^^^^ use of possibly-uninitialized `x`
6
7 error[E0594]: cannot assign to `x.b`, as `x` is not declared as mutable
8   --> $DIR/reassignment_immutable_fields_overlapping.rs:13:5
9    |
10 LL |     let x: Foo;
11    |         - help: consider changing this to be mutable: `mut x`
12 LL |     x.a = 1;
13 LL |     x.b = 22;
14    |     ^^^^^^^^ cannot assign
15
16 error: aborting due to 2 previous errors
17
18 Some errors have detailed explanations: E0381, E0594.
19 For more information about an error, try `rustc --explain E0381`.