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

25 lines
682 B
Text
Raw Normal View History

error[E0596]: cannot borrow immutable local variable `y` as mutable
2018-12-25 08:56:47 -07:00
--> $DIR/augmented-assignments.rs:21:5
|
2018-02-23 03:42:32 +03:00
LL | let y = Int(2);
| - help: make this binding mutable: `mut y`
...
2019-03-09 15:03:44 +03:00
LL | y
| ^ cannot borrow mutably
error[E0382]: use of moved value: `x`
2018-12-25 08:56:47 -07:00
--> $DIR/augmented-assignments.rs:13:5
|
2019-03-09 15:03:44 +03:00
LL | x
| ^ value used here after move
...
2019-03-09 15:03:44 +03:00
LL | x;
| - 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
Some errors have detailed explanations: E0382, E0596.
2018-03-03 15:59:40 +01:00
For more information about an error, try `rustc --explain E0382`.