2018-06-27 22:07:20 +01:00
|
|
|
error[E0507]: cannot move out of borrowed content
|
|
|
|
--> $DIR/move-errors.rs:19:13
|
|
|
|
|
|
|
|
|
LL | let b = *a;
|
|
|
|
| ^^
|
|
|
|
| |
|
|
|
|
| cannot move out of borrowed content
|
2018-08-13 16:45:40 -07:00
|
|
|
| help: consider removing the `*`: `a`
|
2018-06-27 22:07:20 +01:00
|
|
|
|
|
|
|
error[E0508]: cannot move out of type `[A; 1]`, a non-copy array
|
|
|
|
--> $DIR/move-errors.rs:25:13
|
|
|
|
|
|
|
|
|
LL | let b = a[0];
|
|
|
|
| ^^^^
|
|
|
|
| |
|
|
|
|
| cannot move out of here
|
2018-08-13 16:45:40 -07:00
|
|
|
| help: consider borrowing here: `&a[0]`
|
2018-06-27 22:07:20 +01:00
|
|
|
|
|
|
|
error[E0507]: cannot move out of borrowed content
|
|
|
|
--> $DIR/move-errors.rs:32:13
|
|
|
|
|
|
|
|
|
LL | let s = **r;
|
|
|
|
| ^^^
|
|
|
|
| |
|
|
|
|
| cannot move out of borrowed content
|
2018-08-13 16:45:40 -07:00
|
|
|
| help: consider removing the `*`: `*r`
|
2018-06-27 22:07:20 +01:00
|
|
|
|
|
|
|
error[E0507]: cannot move out of borrowed content
|
|
|
|
--> $DIR/move-errors.rs:40:13
|
|
|
|
|
|
|
|
|
LL | let s = *r;
|
|
|
|
| ^^
|
|
|
|
| |
|
|
|
|
| cannot move out of borrowed content
|
2018-08-13 16:45:40 -07:00
|
|
|
| help: consider removing the `*`: `r`
|
2018-06-27 22:07:20 +01:00
|
|
|
|
|
|
|
error[E0508]: cannot move out of type `[A; 1]`, a non-copy array
|
|
|
|
--> $DIR/move-errors.rs:45:13
|
|
|
|
|
|
|
|
|
LL | let a = [A("".to_string())][0];
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| cannot move out of here
|
2018-08-13 16:45:40 -07:00
|
|
|
| help: consider borrowing here: `&[A("".to_string())][0]`
|
2018-06-27 22:07:20 +01:00
|
|
|
|
|
|
|
error[E0507]: cannot move out of borrowed content
|
|
|
|
--> $DIR/move-errors.rs:51:16
|
|
|
|
|
|
|
|
|
LL | let A(s) = *a;
|
|
|
|
| - ^^
|
|
|
|
| | |
|
|
|
|
| | cannot move out of borrowed content
|
2018-08-13 16:45:40 -07:00
|
|
|
| | help: consider removing the `*`: `a`
|
|
|
|
| data moved here
|
|
|
|
|
|
|
|
|
note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
|
|
|
|
--> $DIR/move-errors.rs:51:11
|
|
|
|
|
|
|
|
|
LL | let A(s) = *a;
|
|
|
|
| ^
|
2018-06-27 22:07:20 +01:00
|
|
|
|
|
|
|
error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
|
|
|
|
--> $DIR/move-errors.rs:57:19
|
|
|
|
|
|
|
|
|
LL | let C(D(s)) = c;
|
|
|
|
| - ^ cannot move out of here
|
|
|
|
| |
|
2018-07-31 17:22:12 +02:00
|
|
|
| data moved here
|
2018-08-13 16:45:40 -07:00
|
|
|
|
|
|
|
|
note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
|
|
|
|
--> $DIR/move-errors.rs:57:13
|
|
|
|
|
|
|
|
|
LL | let C(D(s)) = c;
|
|
|
|
| ^
|
2018-06-27 22:07:20 +01:00
|
|
|
|
|
|
|
error[E0507]: cannot move out of borrowed content
|
|
|
|
--> $DIR/move-errors.rs:64:9
|
|
|
|
|
|
|
|
|
LL | b = *a;
|
|
|
|
| ^^ cannot move out of borrowed content
|
|
|
|
|
|
|
|
error[E0508]: cannot move out of type `[B; 1]`, a non-copy array
|
|
|
|
--> $DIR/move-errors.rs:87:11
|
|
|
|
|
|
|
|
|
LL | match x[0] {
|
|
|
|
| ^^^^
|
|
|
|
| |
|
|
|
|
| cannot move out of here
|
2018-08-13 16:45:40 -07:00
|
|
|
| help: consider borrowing here: `&x[0]`
|
2018-06-27 22:07:20 +01:00
|
|
|
LL | //~^ ERROR
|
|
|
|
LL | B::U(d) => (),
|
2018-08-13 16:45:40 -07:00
|
|
|
| - data moved here
|
2018-06-27 22:07:20 +01:00
|
|
|
LL | B::V(s) => (),
|
2018-08-13 16:45:40 -07:00
|
|
|
| - ...and here
|
|
|
|
|
|
|
|
|
note: move occurs because these variables have types that don't implement the `Copy` trait
|
|
|
|
--> $DIR/move-errors.rs:89:14
|
|
|
|
|
|
|
|
|
LL | B::U(d) => (),
|
|
|
|
| ^
|
|
|
|
LL | B::V(s) => (),
|
|
|
|
| ^
|
2018-06-27 22:07:20 +01:00
|
|
|
|
|
|
|
error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
|
|
|
|
--> $DIR/move-errors.rs:96:11
|
|
|
|
|
|
|
|
|
LL | match x {
|
|
|
|
| ^ cannot move out of here
|
|
|
|
...
|
|
|
|
LL | B::U(D(s)) => (),
|
2018-08-13 16:45:40 -07:00
|
|
|
| - data moved here
|
|
|
|
|
|
|
|
|
note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
|
|
|
|
--> $DIR/move-errors.rs:99:16
|
|
|
|
|
|
|
|
|
LL | B::U(D(s)) => (),
|
|
|
|
| ^
|
2018-06-27 22:07:20 +01:00
|
|
|
|
|
|
|
error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
|
|
|
|
--> $DIR/move-errors.rs:105:11
|
|
|
|
|
|
|
|
|
LL | match x {
|
|
|
|
| ^ cannot move out of here
|
|
|
|
...
|
|
|
|
LL | (D(s), &t) => (),
|
2018-08-13 16:45:40 -07:00
|
|
|
| - data moved here
|
|
|
|
|
|
|
|
|
note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
|
|
|
|
--> $DIR/move-errors.rs:108:12
|
|
|
|
|
|
|
|
|
LL | (D(s), &t) => (),
|
|
|
|
| ^
|
2018-06-27 22:07:20 +01:00
|
|
|
|
|
|
|
error[E0507]: cannot move out of borrowed content
|
|
|
|
--> $DIR/move-errors.rs:105:11
|
|
|
|
|
|
|
|
|
LL | match x {
|
|
|
|
| ^ cannot move out of borrowed content
|
|
|
|
...
|
|
|
|
LL | (D(s), &t) => (),
|
2018-08-13 16:45:40 -07:00
|
|
|
| - data moved here
|
|
|
|
|
|
|
|
|
note: move occurs because `t` has type `std::string::String`, which does not implement the `Copy` trait
|
|
|
|
--> $DIR/move-errors.rs:108:17
|
|
|
|
|
|
|
|
|
LL | (D(s), &t) => (),
|
|
|
|
| ^
|
2018-06-27 22:07:20 +01:00
|
|
|
|
|
|
|
error[E0509]: cannot move out of type `F`, which implements the `Drop` trait
|
|
|
|
--> $DIR/move-errors.rs:115:11
|
|
|
|
|
|
|
|
|
LL | match x {
|
|
|
|
| ^ cannot move out of here
|
2018-07-31 17:22:12 +02:00
|
|
|
LL | //~^ ERROR
|
|
|
|
LL | F(s, mut t) => (),
|
2018-08-13 16:45:40 -07:00
|
|
|
| - ----- ...and here
|
2018-07-31 17:22:12 +02:00
|
|
|
| |
|
|
|
|
| data moved here
|
2018-06-27 22:07:20 +01:00
|
|
|
|
|
2018-08-13 16:45:40 -07:00
|
|
|
note: move occurs because these variables have types that don't implement the `Copy` trait
|
|
|
|
--> $DIR/move-errors.rs:117:11
|
|
|
|
|
|
|
|
|
LL | F(s, mut t) => (),
|
|
|
|
| ^ ^^^^^
|
2018-06-27 22:07:20 +01:00
|
|
|
|
|
|
|
error[E0507]: cannot move out of borrowed content
|
|
|
|
--> $DIR/move-errors.rs:123:11
|
|
|
|
|
|
|
|
|
LL | match *x {
|
|
|
|
| ^^
|
|
|
|
| |
|
|
|
|
| cannot move out of borrowed content
|
2018-08-13 16:45:40 -07:00
|
|
|
| help: consider removing the `*`: `x`
|
2018-06-27 22:07:20 +01:00
|
|
|
LL | //~^ ERROR
|
|
|
|
LL | Ok(s) | Err(s) => (),
|
2018-08-13 16:45:40 -07:00
|
|
|
| - data moved here
|
|
|
|
|
|
|
|
|
note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
|
|
|
|
--> $DIR/move-errors.rs:125:12
|
|
|
|
|
|
|
|
|
LL | Ok(s) | Err(s) => (),
|
|
|
|
| ^
|
2018-06-27 22:07:20 +01:00
|
|
|
|
|
|
|
error: aborting due to 14 previous errors
|
|
|
|
|
|
|
|
Some errors occurred: E0507, E0508, E0509.
|
|
|
|
For more information about an error, try `rustc --explain E0507`.
|