2017-12-10 13:47:55 -06:00
|
|
|
error[E0596]: cannot borrow immutable local variable `y` as mutable
|
2017-12-10 14:29:24 -06:00
|
|
|
--> $DIR/augmented-assignments.rs:30:5
|
2017-12-10 13:47:55 -06:00
|
|
|
|
|
2017-12-10 14:29:24 -06:00
|
|
|
28 | let y = Int(2);
|
2017-12-10 13:47:55 -06:00
|
|
|
| - consider changing this to `mut y`
|
2017-12-10 14:29:24 -06:00
|
|
|
29 | //~^ consider changing this to `mut y`
|
|
|
|
30 | y //~ error: cannot borrow immutable local variable `y` as mutable
|
2017-12-10 13:47:55 -06:00
|
|
|
| ^ cannot borrow mutably
|
|
|
|
|
|
|
|
error[E0382]: use of moved value: `x`
|
|
|
|
--> $DIR/augmented-assignments.rs:23:5
|
|
|
|
|
|
|
|
|
23 | x //~ error: use of moved value: `x`
|
|
|
|
| ^ value used here after move
|
|
|
|
...
|
2017-12-10 14:29:24 -06:00
|
|
|
26 | x; //~ value moved here
|
2017-12-10 13:47:55 -06: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-02-19 14:40:25 -06:00
|
|
|
You've got a few errors: E0382, E0596
|
|
|
|
If you want more information on an error, try using "rustc --explain E0382"
|