]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unop-move-semantics.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[rust.git] / src / test / ui / unop-move-semantics.stderr
1 error[E0382]: use of moved value: `x`
2   --> $DIR/unop-move-semantics.rs:18:5
3    |
4 LL |     !x;
5    |      - value moved here
6 LL | 
7 LL |     x.clone();  //~ ERROR: use of moved value
8    |     ^ value used here after move
9    |
10    = note: move occurs because `x` has type `T`, which does not implement the `Copy` trait
11
12 error[E0505]: cannot move out of `x` because it is borrowed
13   --> $DIR/unop-move-semantics.rs:25:6
14    |
15 LL |     let m = &x;
16    |              - borrow of `x` occurs here
17 ...
18 LL |     !x;  //~ ERROR: cannot move out of `x` because it is borrowed
19    |      ^ move out of `x` occurs here
20
21 error[E0505]: cannot move out of `y` because it is borrowed
22   --> $DIR/unop-move-semantics.rs:27:6
23    |
24 LL |     let n = &mut y;
25    |                  - borrow of `y` occurs here
26 ...
27 LL |     !y;  //~ ERROR: cannot move out of `y` because it is borrowed
28    |      ^ move out of `y` occurs here
29
30 error[E0507]: cannot move out of borrowed content
31   --> $DIR/unop-move-semantics.rs:34:6
32    |
33 LL |     !*m;  //~ ERROR: cannot move out of borrowed content
34    |      ^^ cannot move out of borrowed content
35
36 error[E0507]: cannot move out of borrowed content
37   --> $DIR/unop-move-semantics.rs:36:6
38    |
39 LL |     !*n;  //~ ERROR: cannot move out of borrowed content
40    |      ^^ cannot move out of borrowed content
41
42 error: aborting due to 5 previous errors
43
44 Some errors occurred: E0382, E0505, E0507.
45 For more information about an error, try `rustc --explain E0382`.