]> git.lizzy.rs Git - rust.git/blob - tests/ui/augmented-assignments.stderr
Rollup merge of #107304 - Nilstrieb:ᐸTy as PartialEqᐳ::eq because what else are we...
[rust.git] / tests / ui / augmented-assignments.stderr
1 error[E0505]: cannot move out of `x` because it is borrowed
2   --> $DIR/augmented-assignments.rs:16:5
3    |
4 LL |     let mut x = Int(1);
5    |         ----- binding `x` declared here
6 LL |     x
7    |     - borrow of `x` occurs here
8 ...
9 LL |     x;
10    |     ^ move out of `x` occurs here
11
12 error[E0596]: cannot borrow `y` as mutable, as it is not declared as mutable
13   --> $DIR/augmented-assignments.rs:23:5
14    |
15 LL |     y
16    |     ^ cannot borrow as mutable
17    |
18 help: consider changing this to be mutable
19    |
20 LL |     let mut y = Int(2);
21    |         +++
22
23 error: aborting due to 2 previous errors
24
25 Some errors have detailed explanations: E0505, E0596.
26 For more information about an error, try `rustc --explain E0505`.