|
| 1 | +error[E0594]: cannot assign to field `x.0` of immutable binding |
| 2 | + --> $DIR/reassignment_immutable_fields.rs:17:5 |
| 3 | + | |
| 4 | +LL | let x: (u32, u32); |
| 5 | + | - consider changing this to `mut x` |
| 6 | +LL | x.0 = 1; //~ ERROR |
| 7 | + | ^^^^^^^ cannot mutably borrow field of immutable binding |
| 8 | + |
| 9 | +error[E0594]: cannot assign to field `x.1` of immutable binding |
| 10 | + --> $DIR/reassignment_immutable_fields.rs:18:5 |
| 11 | + | |
| 12 | +LL | let x: (u32, u32); |
| 13 | + | - consider changing this to `mut x` |
| 14 | +LL | x.0 = 1; //~ ERROR |
| 15 | +LL | x.1 = 22; //~ ERROR |
| 16 | + | ^^^^^^^^ cannot mutably borrow field of immutable binding |
| 17 | + |
| 18 | +error[E0381]: use of possibly uninitialized variable: `x.0` |
| 19 | + --> $DIR/reassignment_immutable_fields.rs:19:10 |
| 20 | + | |
| 21 | +LL | drop(x.0); //~ ERROR |
| 22 | + | ^^^ use of possibly uninitialized `x.0` |
| 23 | + |
| 24 | +error[E0381]: use of possibly uninitialized variable: `x.1` |
| 25 | + --> $DIR/reassignment_immutable_fields.rs:20:10 |
| 26 | + | |
| 27 | +LL | drop(x.1); //~ ERROR |
| 28 | + | ^^^ use of possibly uninitialized `x.1` |
| 29 | + |
| 30 | +error[E0594]: cannot assign to field `x.0` of immutable binding |
| 31 | + --> $DIR/reassignment_immutable_fields.rs:25:5 |
| 32 | + | |
| 33 | +LL | let x: (u32, u32); |
| 34 | + | - consider changing this to `mut x` |
| 35 | +LL | x.0 = 1; //~ ERROR |
| 36 | + | ^^^^^^^ cannot mutably borrow field of immutable binding |
| 37 | + |
| 38 | +error[E0594]: cannot assign to field `x.1` of immutable binding |
| 39 | + --> $DIR/reassignment_immutable_fields.rs:26:5 |
| 40 | + | |
| 41 | +LL | let x: (u32, u32); |
| 42 | + | - consider changing this to `mut x` |
| 43 | +LL | x.0 = 1; //~ ERROR |
| 44 | +LL | x.1 = 22; //~ ERROR |
| 45 | + | ^^^^^^^^ cannot mutably borrow field of immutable binding |
| 46 | + |
| 47 | +error[E0381]: use of possibly uninitialized variable: `x` |
| 48 | + --> $DIR/reassignment_immutable_fields.rs:27:10 |
| 49 | + | |
| 50 | +LL | drop(x); //~ ERROR |
| 51 | + | ^ use of possibly uninitialized `x` |
| 52 | + |
| 53 | +error: aborting due to 7 previous errors |
| 54 | + |
| 55 | +Some errors occurred: E0381, E0594. |
| 56 | +For more information about an error, try `rustc --explain E0381`. |
0 commit comments