2018-08-08 14:28:26 +02:00
|
|
|
error[E0382]: use of moved value: `x`
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/unop-move-semantics.rs:8:5
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | !x;
|
|
|
|
| - value moved here
|
|
|
|
LL |
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | x.clone();
|
2018-08-08 14:28:26 +02:00
|
|
|
| ^ value used here after move
|
|
|
|
|
|
|
|
|
= note: move occurs because `x` has type `T`, which does not implement the `Copy` trait
|
|
|
|
|
|
|
|
error[E0505]: cannot move out of `x` because it is borrowed
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/unop-move-semantics.rs:15:6
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | let m = &x;
|
|
|
|
| - borrow of `x` occurs here
|
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | !x;
|
2018-08-08 14:28:26 +02:00
|
|
|
| ^ move out of `x` occurs here
|
|
|
|
|
|
|
|
error[E0505]: cannot move out of `y` because it is borrowed
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/unop-move-semantics.rs:17:6
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | let n = &mut y;
|
|
|
|
| - borrow of `y` occurs here
|
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | !y;
|
2018-08-08 14:28:26 +02:00
|
|
|
| ^ move out of `y` occurs here
|
|
|
|
|
|
|
|
error[E0507]: cannot move out of borrowed content
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/unop-move-semantics.rs:24:6
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | !*m;
|
2018-08-08 14:28:26 +02:00
|
|
|
| ^^ cannot move out of borrowed content
|
|
|
|
|
|
|
|
error[E0507]: cannot move out of borrowed content
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/unop-move-semantics.rs:26:6
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | !*n;
|
2018-08-08 14:28:26 +02:00
|
|
|
| ^^ cannot move out of borrowed content
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
|
2019-04-17 13:26:38 -04:00
|
|
|
Some errors have detailed explanations: E0382, E0505, E0507.
|
2018-08-08 14:28:26 +02:00
|
|
|
For more information about an error, try `rustc --explain E0382`.
|