error[E0594]: cannot assign to field `nyan.how_hungry` of immutable binding | |
--> $DIR/mutable-class-fields.rs:28:3 | |
| | |
LL | let nyan : cat = cat(52, 99); | |
| ---- consider changing this to `mut nyan` | |
LL | nyan.how_hungry = 0; //[ast]~ ERROR cannot assign | |
| ^^^^^^^^^^^^^^^^^^^ cannot mutably borrow field of immutable binding | |
error: aborting due to previous error | |
For more information about this error, try `rustc --explain E0594`. |