blob: f329748139e5004f54193e11ae1834c7e5f51b70 [file] [log] [blame]
error[E0507]: cannot move out of borrowed content
--> $DIR/move-errors.rs:9:13
|
LL | let b = *a;
| ^^
| |
| cannot move out of borrowed content
| help: consider removing the `*`: `a`
error[E0508]: cannot move out of type `[A; 1]`, a non-copy array
--> $DIR/move-errors.rs:15:13
|
LL | let b = a[0];
| ^^^^
| |
| cannot move out of here
| help: consider borrowing here: `&a[0]`
error[E0507]: cannot move out of borrowed content
--> $DIR/move-errors.rs:22:13
|
LL | let s = **r;
| ^^^
| |
| cannot move out of borrowed content
| help: consider removing the `*`: `*r`
error[E0507]: cannot move out of an `Rc`
--> $DIR/move-errors.rs:30:13
|
LL | let s = *r;
| ^^
| |
| cannot move out of an `Rc`
| help: consider removing the `*`: `r`
error[E0508]: cannot move out of type `[A; 1]`, a non-copy array
--> $DIR/move-errors.rs:35:13
|
LL | let a = [A("".to_string())][0];
| ^^^^^^^^^^^^^^^^^^^^^^
| |
| cannot move out of here
| help: consider borrowing here: `&[A("".to_string())][0]`
error[E0507]: cannot move out of borrowed content
--> $DIR/move-errors.rs:41:16
|
LL | let A(s) = *a;
| - ^^
| | |
| | cannot move out of borrowed content
| | 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:41:11
|
LL | let A(s) = *a;
| ^
error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
--> $DIR/move-errors.rs:47:19
|
LL | let C(D(s)) = c;
| - ^ cannot move out of here
| |
| data moved here
|
note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
--> $DIR/move-errors.rs:47:13
|
LL | let C(D(s)) = c;
| ^
error[E0507]: cannot move out of borrowed content
--> $DIR/move-errors.rs:54: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:77:11
|
LL | match x[0] {
| ^^^^
| |
| cannot move out of here
| help: consider borrowing here: `&x[0]`
LL |
LL | B::U(d) => (),
| - data moved here
LL | B::V(s) => (),
| - ...and here
|
note: move occurs because these variables have types that don't implement the `Copy` trait
--> $DIR/move-errors.rs:79:14
|
LL | B::U(d) => (),
| ^
LL | B::V(s) => (),
| ^
error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
--> $DIR/move-errors.rs:86:11
|
LL | match x {
| ^ cannot move out of here
...
LL | B::U(D(s)) => (),
| - data moved here
|
note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
--> $DIR/move-errors.rs:89:16
|
LL | B::U(D(s)) => (),
| ^
error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
--> $DIR/move-errors.rs:95:11
|
LL | match x {
| ^ cannot move out of here
...
LL | (D(s), &t) => (),
| - data moved here
|
note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
--> $DIR/move-errors.rs:98:12
|
LL | (D(s), &t) => (),
| ^
error[E0507]: cannot move out of borrowed content
--> $DIR/move-errors.rs:95:11
|
LL | match x {
| ^ cannot move out of borrowed content
...
LL | (D(s), &t) => (),
| - data moved here
|
note: move occurs because `t` has type `std::string::String`, which does not implement the `Copy` trait
--> $DIR/move-errors.rs:98:17
|
LL | (D(s), &t) => (),
| ^
error[E0509]: cannot move out of type `F`, which implements the `Drop` trait
--> $DIR/move-errors.rs:105:11
|
LL | match x {
| ^ cannot move out of here
LL |
LL | F(s, mut t) => (),
| - ----- ...and here
| |
| data moved here
|
note: move occurs because these variables have types that don't implement the `Copy` trait
--> $DIR/move-errors.rs:107:11
|
LL | F(s, mut t) => (),
| ^ ^^^^^
error[E0507]: cannot move out of borrowed content
--> $DIR/move-errors.rs:113:11
|
LL | match *x {
| ^^
| |
| cannot move out of borrowed content
| help: consider removing the `*`: `x`
LL |
LL | Ok(s) | Err(s) => (),
| - data moved here
|
note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
--> $DIR/move-errors.rs:115:12
|
LL | Ok(s) | Err(s) => (),
| ^
error: aborting due to 14 previous errors
Some errors occurred: E0507, E0508, E0509.
For more information about an error, try `rustc --explain E0507`.