1
Fork 0
rust/src/test/ui/augmented-assignments.stderr

25 lines
827 B
Text
Raw Normal View History

error[E0596]: cannot borrow immutable local variable `y` as mutable
--> $DIR/augmented-assignments.rs:30:5
|
2018-02-23 03:42:32 +03:00
LL | let y = Int(2);
| - consider changing this to `mut y`
2018-02-25 02:01:39 +03:00
LL | //~^ consider changing this to `mut y`
2018-02-23 03:42:32 +03:00
LL | y //~ error: cannot borrow immutable local variable `y` as mutable
| ^ cannot borrow mutably
error[E0382]: use of moved value: `x`
--> $DIR/augmented-assignments.rs:23:5
|
2018-02-23 03:42:32 +03:00
LL | x //~ error: use of moved value: `x`
| ^ value used here after move
...
2018-02-23 03:42:32 +03:00
LL | x; //~ value moved here
| - 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`.