1
Fork 0
rust/src/test/ui/rfc-2005-default-binding-mode/enum.stderr

28 lines
975 B
Text
Raw Normal View History

error[E0594]: cannot assign to immutable borrowed content `*x`
--> $DIR/enum.rs:21:5
|
2018-02-23 03:42:32 +03:00
LL | let Wrap(x) = &Wrap(3);
| - consider changing this to `x`
2018-02-23 03:42:32 +03:00
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
|
2018-02-23 03:42:32 +03:00
LL | if let Some(x) = &Some(3) {
| - consider changing this to `x`
2018-02-23 03:42:32 +03:00
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
|
2018-02-23 03:42:32 +03:00
LL | while let Some(x) = &Some(3) {
| - consider changing this to `x`
2018-02-23 03:42:32 +03:00
LL | *x += 1; //~ ERROR cannot assign to immutable
| ^^^^^^^ cannot borrow as mutable
error: aborting due to 3 previous errors
2018-02-19 21:40:25 +01:00
If you want more information on this error, try using "rustc --explain E0594"