error[E0594]: cannot assign to immutable borrowed content `*x` --> $DIR/enum.rs:21:5 | LL | let Wrap(x) = &Wrap(3); | - consider changing this to `x` LL | *x += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable borrowed content `*x` --> $DIR/enum.rs:25:9 | LL | if let Some(x) = &Some(3) { | - consider changing this to `x` LL | *x += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable borrowed content `*x` --> $DIR/enum.rs:31:9 | LL | while let Some(x) = &Some(3) { | - consider changing this to `x` LL | *x += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ cannot borrow as mutable error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0594`.