1 error[E0507]: cannot move out of `*r` which is behind a shared reference
2 --> $DIR/cannot-move-block-spans.rs:5:15
5 | ^^ move occurs because `*r` has type `String`, which does not implement the `Copy` trait
7 help: consider removing the dereference here
13 error[E0507]: cannot move out of `*r` which is behind a shared reference
14 --> $DIR/cannot-move-block-spans.rs:6:22
16 LL | let y = unsafe { *r };
17 | ^^ move occurs because `*r` has type `String`, which does not implement the `Copy` trait
19 help: consider removing the dereference here
21 LL - let y = unsafe { *r };
22 LL + let y = unsafe { r };
25 error[E0507]: cannot move out of `*r` which is behind a shared reference
26 --> $DIR/cannot-move-block-spans.rs:7:26
28 LL | let z = loop { break *r; };
29 | ^^ move occurs because `*r` has type `String`, which does not implement the `Copy` trait
31 help: consider removing the dereference here
33 LL - let z = loop { break *r; };
34 LL + let z = loop { break r; };
37 error[E0508]: cannot move out of type `[String; 2]`, a non-copy array
38 --> $DIR/cannot-move-block-spans.rs:11:15
40 LL | let x = { arr[0] };
43 | cannot move out of here
44 | move occurs because `arr[_]` has type `String`, which does not implement the `Copy` trait
46 help: consider borrowing here
48 LL | let x = { &arr[0] };
51 error[E0508]: cannot move out of type `[String; 2]`, a non-copy array
52 --> $DIR/cannot-move-block-spans.rs:12:22
54 LL | let y = unsafe { arr[0] };
57 | cannot move out of here
58 | move occurs because `arr[_]` has type `String`, which does not implement the `Copy` trait
60 help: consider borrowing here
62 LL | let y = unsafe { &arr[0] };
65 error[E0508]: cannot move out of type `[String; 2]`, a non-copy array
66 --> $DIR/cannot-move-block-spans.rs:13:26
68 LL | let z = loop { break arr[0]; };
71 | cannot move out of here
72 | move occurs because `arr[_]` has type `String`, which does not implement the `Copy` trait
74 help: consider borrowing here
76 LL | let z = loop { break &arr[0]; };
79 error[E0507]: cannot move out of `*r` which is behind a shared reference
80 --> $DIR/cannot-move-block-spans.rs:17:38
82 LL | let x = { let mut u = 0; u += 1; *r };
83 | ^^ move occurs because `*r` has type `String`, which does not implement the `Copy` trait
85 help: consider removing the dereference here
87 LL - let x = { let mut u = 0; u += 1; *r };
88 LL + let x = { let mut u = 0; u += 1; r };
91 error[E0507]: cannot move out of `*r` which is behind a shared reference
92 --> $DIR/cannot-move-block-spans.rs:18:45
94 LL | let y = unsafe { let mut u = 0; u += 1; *r };
95 | ^^ move occurs because `*r` has type `String`, which does not implement the `Copy` trait
97 help: consider removing the dereference here
99 LL - let y = unsafe { let mut u = 0; u += 1; *r };
100 LL + let y = unsafe { let mut u = 0; u += 1; r };
103 error[E0507]: cannot move out of `*r` which is behind a shared reference
104 --> $DIR/cannot-move-block-spans.rs:19:49
106 LL | let z = loop { let mut u = 0; u += 1; break *r; u += 2; };
107 | ^^ move occurs because `*r` has type `String`, which does not implement the `Copy` trait
109 help: consider removing the dereference here
111 LL - let z = loop { let mut u = 0; u += 1; break *r; u += 2; };
112 LL + let z = loop { let mut u = 0; u += 1; break r; u += 2; };
115 error: aborting due to 9 previous errors
117 Some errors have detailed explanations: E0507, E0508.
118 For more information about an error, try `rustc --explain E0507`.