2019-09-01 18:09:59 +01:00
|
|
|
error[E0381]: assign to part of possibly-uninitialized variable: `x`
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/reassignment_immutable_fields_overlapping.rs:12:5
|
2018-08-14 08:24:44 -04:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | x.a = 1;
|
2019-09-01 18:09:59 +01:00
|
|
|
| ^^^^^^^ use of possibly-uninitialized `x`
|
2018-08-14 08:24:44 -04:00
|
|
|
|
2019-04-22 08:40:08 +01:00
|
|
|
error[E0594]: cannot assign to `x.b`, as `x` is not declared as mutable
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/reassignment_immutable_fields_overlapping.rs:13:5
|
2018-08-14 08:24:44 -04:00
|
|
|
|
|
|
|
|
LL | let x: Foo;
|
2019-04-22 08:40:08 +01:00
|
|
|
| - help: consider changing this to be mutable: `mut x`
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | x.a = 1;
|
|
|
|
LL | x.b = 22;
|
2019-04-22 08:40:08 +01:00
|
|
|
| ^^^^^^^^ cannot assign
|
2018-08-14 08:24:44 -04:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2019-04-22 08:40:08 +01:00
|
|
|
For more information about this error, try `rustc --explain E0381`.
|