2018-08-14 07:24:44 -05:00
|
|
|
error[E0594]: cannot assign to field `x.0` of immutable binding
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/reassignment_immutable_fields_twice.rs:7:5
|
2018-08-14 07:24:44 -05:00
|
|
|
|
|
|
|
|
LL | let x: (u32, u32);
|
2018-09-12 13:13:40 -05:00
|
|
|
| - help: make this binding mutable: `mut x`
|
2018-08-14 07:24:44 -05:00
|
|
|
LL | x = (22, 44);
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | x.0 = 1;
|
2018-08-14 07:24:44 -05:00
|
|
|
| ^^^^^^^ cannot mutably borrow field of immutable binding
|
|
|
|
|
|
|
|
error[E0594]: cannot assign to field `x.0` of immutable binding
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/reassignment_immutable_fields_twice.rs:12:5
|
2018-08-14 07:24:44 -05:00
|
|
|
|
|
|
|
|
LL | let x: (u32, u32);
|
2018-09-12 13:13:40 -05:00
|
|
|
| - help: make this binding mutable: `mut x`
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | x.0 = 1;
|
2018-08-14 07:24:44 -05:00
|
|
|
| ^^^^^^^ cannot mutably borrow field of immutable binding
|
|
|
|
|
|
|
|
error[E0594]: cannot assign to field `x.0` of immutable binding
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/reassignment_immutable_fields_twice.rs:13:5
|
2018-08-14 07:24:44 -05:00
|
|
|
|
|
|
|
|
LL | let x: (u32, u32);
|
2018-09-12 13:13:40 -05:00
|
|
|
| - help: make this binding mutable: `mut x`
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | x.0 = 1;
|
|
|
|
LL | x.0 = 22;
|
2018-08-14 07:24:44 -05:00
|
|
|
| ^^^^^^^^ cannot mutably borrow field of immutable binding
|
|
|
|
|
|
|
|
error[E0594]: cannot assign to field `x.1` of immutable binding
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/reassignment_immutable_fields_twice.rs:14:5
|
2018-08-14 07:24:44 -05:00
|
|
|
|
|
|
|
|
LL | let x: (u32, u32);
|
2018-09-12 13:13:40 -05:00
|
|
|
| - help: make this binding mutable: `mut x`
|
2018-08-14 07:24:44 -05:00
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | x.1 = 44;
|
2018-08-14 07:24:44 -05:00
|
|
|
| ^^^^^^^^ cannot mutably borrow field of immutable binding
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|