2017-12-10 22:47:55 +03:00
|
|
|
error[E0596]: cannot borrow immutable local variable `y` as mutable
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/augmented-assignments.rs:21:5
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | let y = Int(2);
|
2018-09-12 14:13:40 -04:00
|
|
|
| - help: make this binding mutable: `mut y`
|
|
|
|
...
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | y //~ error: cannot borrow immutable local variable `y` as mutable
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^ cannot borrow mutably
|
|
|
|
|
|
|
|
error[E0382]: use of moved value: `x`
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/augmented-assignments.rs:13:5
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | x //~ error: use of moved value: `x`
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^ value used here after move
|
|
|
|
...
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | x; //~ value moved here
|
2017-12-10 22:47:55 +03:00
|
|
|
| - value moved here
|
|
|
|
|
|
|
|
|
= note: move occurs because `x` has type `Int`, which does not implement the `Copy` trait
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2018-03-03 15:59:40 +01:00
|
|
|
Some errors occurred: E0382, E0596.
|
|
|
|
For more information about an error, try `rustc --explain E0382`.
|