28 lines
965 B
Plaintext
28 lines
965 B
Plaintext
error[E0594]: cannot assign to immutable borrowed content `*x`
|
|
--> $DIR/enum.rs:19: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:23: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:29: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`.
|