rust/src/test/ui/augmented-assignments.stderr

25 lines
827 B
Plaintext
Raw Normal View History

error[E0596]: cannot borrow immutable local variable `y` as mutable
--> $DIR/augmented-assignments.rs:30:5
|
2018-02-22 18:42:32 -06:00
LL | let y = Int(2);
| - consider changing this to `mut y`
2018-02-24 17:01:39 -06:00
LL | //~^ consider changing this to `mut y`
2018-02-22 18:42:32 -06: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-22 18:42:32 -06:00
LL | x //~ error: use of moved value: `x`
| ^ value used here after move
...
2018-02-22 18:42:32 -06: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 08:59:40 -06:00
Some errors occurred: E0382, E0596.
For more information about an error, try `rustc --explain E0382`.