error[E0594]: cannot assign to data in a `&` reference --> $DIR/enum.rs:19:5 | LL | let Wrap(x) = &Wrap(3); | - help: consider changing this to be a mutable reference: `&mut` LL | *x += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ error[E0594]: cannot assign to data in a `&` reference --> $DIR/enum.rs:23:9 | LL | if let Some(x) = &Some(3) { | - help: consider changing this to be a mutable reference: `&mut` LL | *x += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ error[E0594]: cannot assign to data in a `&` reference --> $DIR/enum.rs:29:9 | LL | while let Some(x) = &Some(3) { | - help: consider changing this to be a mutable reference: `&mut` LL | *x += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0594`.