2019-05-05 11:02:32 +00:00
|
|
|
error[E0507]: cannot move out of `*a` which is behind a shared reference
|
2019-04-07 15:07:36 +00:00
|
|
|
--> $DIR/move-errors.rs:6:13
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
|
LL | let b = *a;
|
|
|
|
| ^^
|
|
|
|
| |
|
2019-05-05 11:02:32 +00:00
|
|
|
| move occurs because `*a` has type `A`, which does not implement the `Copy` trait
|
2019-05-29 22:58:54 +00:00
|
|
|
| help: consider borrowing here: `&*a`
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
error[E0508]: cannot move out of type `[A; 1]`, a non-copy array
|
2019-04-07 15:07:36 +00:00
|
|
|
--> $DIR/move-errors.rs:12:13
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
|
LL | let b = a[0];
|
|
|
|
| ^^^^
|
|
|
|
| |
|
|
|
|
| cannot move out of here
|
2019-05-05 11:02:32 +00:00
|
|
|
| move occurs because `a[_]` has type `A`, which does not implement the `Copy` trait
|
2018-08-13 23:45:40 +00:00
|
|
|
| help: consider borrowing here: `&a[0]`
|
2018-06-27 21:07:20 +00:00
|
|
|
|
2019-05-05 11:02:32 +00:00
|
|
|
error[E0507]: cannot move out of `**r` which is behind a shared reference
|
2019-04-07 15:07:36 +00:00
|
|
|
--> $DIR/move-errors.rs:19:13
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
|
LL | let s = **r;
|
|
|
|
| ^^^
|
|
|
|
| |
|
2019-05-05 11:02:32 +00:00
|
|
|
| move occurs because `**r` has type `A`, which does not implement the `Copy` trait
|
2019-05-29 22:58:54 +00:00
|
|
|
| help: consider borrowing here: `&**r`
|
2018-06-27 21:07:20 +00:00
|
|
|
|
2018-09-30 19:21:31 +00:00
|
|
|
error[E0507]: cannot move out of an `Rc`
|
2019-04-07 15:07:36 +00:00
|
|
|
--> $DIR/move-errors.rs:27:13
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
|
LL | let s = *r;
|
|
|
|
| ^^
|
|
|
|
| |
|
2019-05-05 11:02:32 +00:00
|
|
|
| move occurs because value has type `A`, which does not implement the `Copy` trait
|
2019-05-29 22:58:54 +00:00
|
|
|
| help: consider borrowing here: `&*r`
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
error[E0508]: cannot move out of type `[A; 1]`, a non-copy array
|
2019-04-07 15:07:36 +00:00
|
|
|
--> $DIR/move-errors.rs:32:13
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
|
LL | let a = [A("".to_string())][0];
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| cannot move out of here
|
2019-05-05 11:02:32 +00:00
|
|
|
| move occurs because value has type `A`, which does not implement the `Copy` trait
|
2018-08-13 23:45:40 +00:00
|
|
|
| help: consider borrowing here: `&[A("".to_string())][0]`
|
2018-06-27 21:07:20 +00:00
|
|
|
|
2019-05-05 11:02:32 +00:00
|
|
|
error[E0507]: cannot move out of `a.0` which is behind a shared reference
|
2019-04-07 15:07:36 +00:00
|
|
|
--> $DIR/move-errors.rs:38:16
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
|
LL | let A(s) = *a;
|
2019-05-29 22:58:54 +00:00
|
|
|
| - ^^ help: consider borrowing here: `&*a`
|
2019-05-05 11:02:32 +00:00
|
|
|
| |
|
2018-08-13 23:45:40 +00:00
|
|
|
| data moved here
|
2020-09-02 07:40:56 +00:00
|
|
|
| move occurs because `s` has type `String`, which does not implement the `Copy` trait
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
|
2019-04-07 15:07:36 +00:00
|
|
|
--> $DIR/move-errors.rs:44:19
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
|
LL | let C(D(s)) = c;
|
|
|
|
| - ^ cannot move out of here
|
|
|
|
| |
|
2018-07-31 15:22:12 +00:00
|
|
|
| data moved here
|
2020-09-02 07:40:56 +00:00
|
|
|
| move occurs because `s` has type `String`, which does not implement the `Copy` trait
|
2018-06-27 21:07:20 +00:00
|
|
|
|
2019-05-05 11:02:32 +00:00
|
|
|
error[E0507]: cannot move out of `*a` which is behind a shared reference
|
2019-04-07 15:07:36 +00:00
|
|
|
--> $DIR/move-errors.rs:51:9
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
|
LL | b = *a;
|
2019-05-05 11:02:32 +00:00
|
|
|
| ^^ move occurs because `*a` has type `A`, which does not implement the `Copy` trait
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
error[E0508]: cannot move out of type `[B; 1]`, a non-copy array
|
2019-04-07 15:07:36 +00:00
|
|
|
--> $DIR/move-errors.rs:74:11
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
|
LL | match x[0] {
|
|
|
|
| ^^^^
|
|
|
|
| |
|
|
|
|
| cannot move out of here
|
2018-08-13 23:45:40 +00:00
|
|
|
| help: consider borrowing here: `&x[0]`
|
2019-03-09 12:03:44 +00:00
|
|
|
LL |
|
2018-06-27 21:07:20 +00:00
|
|
|
LL | B::U(d) => (),
|
2018-08-13 23:45:40 +00:00
|
|
|
| - data moved here
|
2018-06-27 21:07:20 +00:00
|
|
|
LL | B::V(s) => (),
|
2018-08-13 23:45:40 +00:00
|
|
|
| - ...and here
|
|
|
|
|
|
2019-11-25 20:32:57 +00:00
|
|
|
= note: move occurs because these variables have types that don't implement the `Copy` trait
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
|
2019-04-07 15:07:36 +00:00
|
|
|
--> $DIR/move-errors.rs:83:11
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
|
LL | match x {
|
|
|
|
| ^ cannot move out of here
|
|
|
|
...
|
|
|
|
LL | B::U(D(s)) => (),
|
2019-05-05 11:02:32 +00:00
|
|
|
| -
|
|
|
|
| |
|
|
|
|
| data moved here
|
2020-09-02 07:40:56 +00:00
|
|
|
| move occurs because `s` has type `String`, which does not implement the `Copy` trait
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
|
2019-04-07 15:07:36 +00:00
|
|
|
--> $DIR/move-errors.rs:92:11
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
|
LL | match x {
|
|
|
|
| ^ cannot move out of here
|
|
|
|
...
|
|
|
|
LL | (D(s), &t) => (),
|
2019-05-05 11:02:32 +00:00
|
|
|
| -
|
|
|
|
| |
|
|
|
|
| data moved here
|
2020-09-02 07:40:56 +00:00
|
|
|
| move occurs because `s` has type `String`, which does not implement the `Copy` trait
|
2018-06-27 21:07:20 +00:00
|
|
|
|
2019-05-05 11:02:32 +00:00
|
|
|
error[E0507]: cannot move out of `*x.1` which is behind a shared reference
|
2019-04-07 15:07:36 +00:00
|
|
|
--> $DIR/move-errors.rs:92:11
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
|
LL | match x {
|
2019-05-05 11:02:32 +00:00
|
|
|
| ^
|
2018-06-27 21:07:20 +00:00
|
|
|
...
|
|
|
|
LL | (D(s), &t) => (),
|
2019-05-05 11:02:32 +00:00
|
|
|
| -
|
|
|
|
| |
|
|
|
|
| data moved here
|
2020-09-02 07:40:56 +00:00
|
|
|
| move occurs because `t` has type `String`, which does not implement the `Copy` trait
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
error[E0509]: cannot move out of type `F`, which implements the `Drop` trait
|
2019-04-07 15:07:36 +00:00
|
|
|
--> $DIR/move-errors.rs:102:11
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
|
LL | match x {
|
|
|
|
| ^ cannot move out of here
|
2019-03-09 12:03:44 +00:00
|
|
|
LL |
|
2018-07-31 15:22:12 +00:00
|
|
|
LL | F(s, mut t) => (),
|
2018-08-13 23:45:40 +00:00
|
|
|
| - ----- ...and here
|
2018-07-31 15:22:12 +00:00
|
|
|
| |
|
|
|
|
| data moved here
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
2019-11-25 20:32:57 +00:00
|
|
|
= note: move occurs because these variables have types that don't implement the `Copy` trait
|
2018-06-27 21:07:20 +00:00
|
|
|
|
2019-05-05 11:02:32 +00:00
|
|
|
error[E0507]: cannot move out of `x.0` which is behind a shared reference
|
2019-04-07 15:07:36 +00:00
|
|
|
--> $DIR/move-errors.rs:110:11
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
|
LL | match *x {
|
2019-05-29 22:58:54 +00:00
|
|
|
| ^^ help: consider borrowing here: `&*x`
|
2019-03-09 12:03:44 +00:00
|
|
|
LL |
|
2018-06-27 21:07:20 +00:00
|
|
|
LL | Ok(s) | Err(s) => (),
|
2019-05-05 11:02:32 +00:00
|
|
|
| -
|
|
|
|
| |
|
|
|
|
| data moved here
|
2020-09-02 07:40:56 +00:00
|
|
|
| move occurs because `s` has type `String`, which does not implement the `Copy` trait
|
2018-06-27 21:07:20 +00:00
|
|
|
|
|
|
|
error: aborting due to 14 previous errors
|
|
|
|
|
2019-04-17 17:26:38 +00:00
|
|
|
Some errors have detailed explanations: E0507, E0508, E0509.
|
2018-06-27 21:07:20 +00:00
|
|
|
For more information about an error, try `rustc --explain E0507`.
|