@@ -5,7 +5,7 @@ LL | let x = { *r };
5
5
| ^^
6
6
| |
7
7
| move occurs because `*r` has type `std::string::String`, which does not implement the `Copy` trait
8
- | help: consider removing the `*` : `r`
8
+ | help: consider borrowing here : `&* r`
9
9
10
10
error[E0507]: cannot move out of `*r` which is behind a shared reference
11
11
--> $DIR/cannot-move-block-spans.rs:6:22
@@ -14,7 +14,7 @@ LL | let y = unsafe { *r };
14
14
| ^^
15
15
| |
16
16
| move occurs because `*r` has type `std::string::String`, which does not implement the `Copy` trait
17
- | help: consider removing the `*` : `r`
17
+ | help: consider borrowing here : `&* r`
18
18
19
19
error[E0507]: cannot move out of `*r` which is behind a shared reference
20
20
--> $DIR/cannot-move-block-spans.rs:7:26
@@ -23,7 +23,7 @@ LL | let z = loop { break *r; };
23
23
| ^^
24
24
| |
25
25
| move occurs because `*r` has type `std::string::String`, which does not implement the `Copy` trait
26
- | help: consider removing the `*` : `r`
26
+ | help: consider borrowing here : `&* r`
27
27
28
28
error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array
29
29
--> $DIR/cannot-move-block-spans.rs:11:15
@@ -62,7 +62,7 @@ LL | let x = { let mut u = 0; u += 1; *r };
62
62
| ^^
63
63
| |
64
64
| move occurs because `*r` has type `std::string::String`, which does not implement the `Copy` trait
65
- | help: consider removing the `*` : `r`
65
+ | help: consider borrowing here : `&* r`
66
66
67
67
error[E0507]: cannot move out of `*r` which is behind a shared reference
68
68
--> $DIR/cannot-move-block-spans.rs:18:45
@@ -71,7 +71,7 @@ LL | let y = unsafe { let mut u = 0; u += 1; *r };
71
71
| ^^
72
72
| |
73
73
| move occurs because `*r` has type `std::string::String`, which does not implement the `Copy` trait
74
- | help: consider removing the `*` : `r`
74
+ | help: consider borrowing here : `&* r`
75
75
76
76
error[E0507]: cannot move out of `*r` which is behind a shared reference
77
77
--> $DIR/cannot-move-block-spans.rs:19:49
@@ -80,7 +80,7 @@ LL | let z = loop { let mut u = 0; u += 1; break *r; u += 2; };
80
80
| ^^
81
81
| |
82
82
| move occurs because `*r` has type `std::string::String`, which does not implement the `Copy` trait
83
- | help: consider removing the `*` : `r`
83
+ | help: consider borrowing here : `&* r`
84
84
85
85
error: aborting due to 9 previous errors
86
86
0 commit comments