]> git.lizzy.rs Git - rust.git/blob - src/test/ui/augmented-assignments.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[rust.git] / src / test / ui / augmented-assignments.stderr
1 error[E0596]: cannot borrow immutable local variable `y` as mutable
2   --> $DIR/augmented-assignments.rs:30:5
3    |
4 LL |     let y = Int(2);
5    |         - consider changing this to `mut y`
6 LL |     //~^ consider changing this to `mut y`
7 LL |     y   //~ error: cannot borrow immutable local variable `y` as mutable
8    |     ^ cannot borrow mutably
9
10 error[E0382]: use of moved value: `x`
11   --> $DIR/augmented-assignments.rs:23:5
12    |
13 LL |     x   //~ error: use of moved value: `x`
14    |     ^ value used here after move
15 ...
16 LL |     x;  //~ value moved here
17    |     - value moved here
18    |
19    = note: move occurs because `x` has type `Int`, which does not implement the `Copy` trait
20
21 error: aborting due to 2 previous errors
22
23 Some errors occurred: E0382, E0596.
24 For more information about an error, try `rustc --explain E0382`.