Files
rust/src/test/ui/rfc-2005-default-binding-mode/enum.stderr

27 lines
897 B
Plaintext
Raw Normal View History

error[E0594]: cannot assign to immutable borrowed content `*x`
--> $DIR/enum.rs:21:5
|
20 | let Wrap(x) = &Wrap(3);
| - consider changing this to `x`
2017-11-20 13:13:27 +01:00
21 | *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
|
24 | if let Some(x) = &Some(3) {
| - consider changing this to `x`
2017-11-20 13:13:27 +01:00
25 | *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
|
30 | while let Some(x) = &Some(3) {
| - consider changing this to `x`
2017-11-20 13:13:27 +01:00
31 | *x += 1; //~ ERROR cannot assign to immutable
| ^^^^^^^ cannot borrow as mutable
error: aborting due to 3 previous errors