2019-05-05 11:02:32 +00:00
|
|
|
error[E0507]: cannot move out of `*r` which is behind a shared reference
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/cannot-move-block-spans.rs:5:15
|
2018-07-22 20:38:31 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | let x = { *r };
|
2022-12-08 17:02:54 +00:00
|
|
|
| ^^ move occurs because `*r` has type `String`, which does not implement the `Copy` trait
|
|
|
|
|
|
2022-12-09 21:01:41 +00:00
|
|
|
help: consider removing the dereference here
|
|
|
|
|
|
|
|
|
LL - let x = { *r };
|
|
|
|
LL + let x = { r };
|
2022-12-08 17:02:54 +00:00
|
|
|
|
|
2018-07-22 20:38:31 +00:00
|
|
|
|
2019-05-05 11:02:32 +00:00
|
|
|
error[E0507]: cannot move out of `*r` which is behind a shared reference
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/cannot-move-block-spans.rs:6:22
|
2018-07-22 20:38:31 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | let y = unsafe { *r };
|
2022-12-08 17:02:54 +00:00
|
|
|
| ^^ move occurs because `*r` has type `String`, which does not implement the `Copy` trait
|
|
|
|
|
|
2022-12-09 21:01:41 +00:00
|
|
|
help: consider removing the dereference here
|
|
|
|
|
|
|
|
|
LL - let y = unsafe { *r };
|
|
|
|
LL + let y = unsafe { r };
|
2022-12-08 17:02:54 +00:00
|
|
|
|
|
2018-07-22 20:38:31 +00:00
|
|
|
|
2019-05-05 11:02:32 +00:00
|
|
|
error[E0507]: cannot move out of `*r` which is behind a shared reference
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/cannot-move-block-spans.rs:7:26
|
2018-07-22 20:38:31 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | let z = loop { break *r; };
|
2022-12-08 17:02:54 +00:00
|
|
|
| ^^ move occurs because `*r` has type `String`, which does not implement the `Copy` trait
|
|
|
|
|
|
2022-12-09 21:01:41 +00:00
|
|
|
help: consider removing the dereference here
|
|
|
|
|
|
|
|
|
LL - let z = loop { break *r; };
|
|
|
|
LL + let z = loop { break r; };
|
2022-12-08 17:02:54 +00:00
|
|
|
|
|
2018-07-22 20:38:31 +00:00
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
error[E0508]: cannot move out of type `[String; 2]`, a non-copy array
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/cannot-move-block-spans.rs:11:15
|
2018-07-22 20:38:31 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | let x = { arr[0] };
|
2019-04-22 07:40:08 +00:00
|
|
|
| ^^^^^^
|
|
|
|
| |
|
|
|
|
| cannot move out of here
|
2020-09-02 07:40:56 +00:00
|
|
|
| move occurs because `arr[_]` has type `String`, which does not implement the `Copy` trait
|
2022-12-08 17:02:54 +00:00
|
|
|
|
|
|
|
|
help: consider borrowing here
|
|
|
|
|
|
|
|
|
LL | let x = { &arr[0] };
|
|
|
|
| +
|
2018-07-22 20:38:31 +00:00
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
error[E0508]: cannot move out of type `[String; 2]`, a non-copy array
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/cannot-move-block-spans.rs:12:22
|
2018-07-22 20:38:31 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | let y = unsafe { arr[0] };
|
2019-04-22 07:40:08 +00:00
|
|
|
| ^^^^^^
|
|
|
|
| |
|
|
|
|
| cannot move out of here
|
2020-09-02 07:40:56 +00:00
|
|
|
| move occurs because `arr[_]` has type `String`, which does not implement the `Copy` trait
|
2022-12-08 17:02:54 +00:00
|
|
|
|
|
|
|
|
help: consider borrowing here
|
|
|
|
|
|
|
|
|
LL | let y = unsafe { &arr[0] };
|
|
|
|
| +
|
2018-07-22 20:38:31 +00:00
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
error[E0508]: cannot move out of type `[String; 2]`, a non-copy array
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/cannot-move-block-spans.rs:13:26
|
2018-07-22 20:38:31 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | let z = loop { break arr[0]; };
|
2019-04-22 07:40:08 +00:00
|
|
|
| ^^^^^^
|
|
|
|
| |
|
|
|
|
| cannot move out of here
|
2020-09-02 07:40:56 +00:00
|
|
|
| move occurs because `arr[_]` has type `String`, which does not implement the `Copy` trait
|
2022-12-08 17:02:54 +00:00
|
|
|
|
|
|
|
|
help: consider borrowing here
|
|
|
|
|
|
|
|
|
LL | let z = loop { break &arr[0]; };
|
|
|
|
| +
|
2018-07-22 20:38:31 +00:00
|
|
|
|
2019-05-05 11:02:32 +00:00
|
|
|
error[E0507]: cannot move out of `*r` which is behind a shared reference
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/cannot-move-block-spans.rs:17:38
|
2018-07-22 20:38:31 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | let x = { let mut u = 0; u += 1; *r };
|
2022-12-08 17:02:54 +00:00
|
|
|
| ^^ move occurs because `*r` has type `String`, which does not implement the `Copy` trait
|
|
|
|
|
|
2022-12-09 21:01:41 +00:00
|
|
|
help: consider removing the dereference here
|
|
|
|
|
|
|
|
|
LL - let x = { let mut u = 0; u += 1; *r };
|
|
|
|
LL + let x = { let mut u = 0; u += 1; r };
|
2022-12-08 17:02:54 +00:00
|
|
|
|
|
2018-07-22 20:38:31 +00:00
|
|
|
|
2019-05-05 11:02:32 +00:00
|
|
|
error[E0507]: cannot move out of `*r` which is behind a shared reference
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/cannot-move-block-spans.rs:18:45
|
2018-07-22 20:38:31 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | let y = unsafe { let mut u = 0; u += 1; *r };
|
2022-12-08 17:02:54 +00:00
|
|
|
| ^^ move occurs because `*r` has type `String`, which does not implement the `Copy` trait
|
|
|
|
|
|
2022-12-09 21:01:41 +00:00
|
|
|
help: consider removing the dereference here
|
|
|
|
|
|
|
|
|
LL - let y = unsafe { let mut u = 0; u += 1; *r };
|
|
|
|
LL + let y = unsafe { let mut u = 0; u += 1; r };
|
2022-12-08 17:02:54 +00:00
|
|
|
|
|
2018-07-22 20:38:31 +00:00
|
|
|
|
2019-05-05 11:02:32 +00:00
|
|
|
error[E0507]: cannot move out of `*r` which is behind a shared reference
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/cannot-move-block-spans.rs:19:49
|
2018-07-22 20:38:31 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | let z = loop { let mut u = 0; u += 1; break *r; u += 2; };
|
2022-12-08 17:02:54 +00:00
|
|
|
| ^^ move occurs because `*r` has type `String`, which does not implement the `Copy` trait
|
|
|
|
|
|
2022-12-09 21:01:41 +00:00
|
|
|
help: consider removing the dereference here
|
|
|
|
|
|
|
|
|
LL - let z = loop { let mut u = 0; u += 1; break *r; u += 2; };
|
|
|
|
LL + let z = loop { let mut u = 0; u += 1; break r; u += 2; };
|
2022-12-08 17:02:54 +00:00
|
|
|
|
|
2018-07-22 20:38:31 +00:00
|
|
|
|
|
|
|
error: aborting due to 9 previous errors
|
|
|
|
|
2019-04-17 17:26:38 +00:00
|
|
|
Some errors have detailed explanations: E0507, E0508.
|
2018-07-22 20:38:31 +00:00
|
|
|
For more information about an error, try `rustc --explain E0507`.
|