]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/cannot-move-block-spans.stderr
Update tests for changes to cannot move errors
[rust.git] / src / test / ui / nll / cannot-move-block-spans.stderr
1 error[E0507]: cannot move out of `*r` which is behind a shared reference
2   --> $DIR/cannot-move-block-spans.rs:5:15
3    |
4 LL |     let x = { *r };
5    |               ^^
6    |               |
7    |               move occurs because `*r` has type `std::string::String`, which does not implement the `Copy` trait
8    |               help: consider removing the `*`: `r`
9
10 error[E0507]: cannot move out of `*r` which is behind a shared reference
11   --> $DIR/cannot-move-block-spans.rs:6:22
12    |
13 LL |     let y = unsafe { *r };
14    |                      ^^
15    |                      |
16    |                      move occurs because `*r` has type `std::string::String`, which does not implement the `Copy` trait
17    |                      help: consider removing the `*`: `r`
18
19 error[E0507]: cannot move out of `*r` which is behind a shared reference
20   --> $DIR/cannot-move-block-spans.rs:7:26
21    |
22 LL |     let z = loop { break *r; };
23    |                          ^^
24    |                          |
25    |                          move occurs because `*r` has type `std::string::String`, which does not implement the `Copy` trait
26    |                          help: consider removing the `*`: `r`
27
28 error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array
29   --> $DIR/cannot-move-block-spans.rs:11:15
30    |
31 LL |     let x = { arr[0] };
32    |               ^^^^^^
33    |               |
34    |               cannot move out of here
35    |               move occurs because `arr[_]` has type `std::string::String`, which does not implement the `Copy` trait
36    |               help: consider borrowing here: `&arr[0]`
37
38 error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array
39   --> $DIR/cannot-move-block-spans.rs:12:22
40    |
41 LL |     let y = unsafe { arr[0] };
42    |                      ^^^^^^
43    |                      |
44    |                      cannot move out of here
45    |                      move occurs because `arr[_]` has type `std::string::String`, which does not implement the `Copy` trait
46    |                      help: consider borrowing here: `&arr[0]`
47
48 error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array
49   --> $DIR/cannot-move-block-spans.rs:13:26
50    |
51 LL |     let z = loop { break arr[0]; };
52    |                          ^^^^^^
53    |                          |
54    |                          cannot move out of here
55    |                          move occurs because `arr[_]` has type `std::string::String`, which does not implement the `Copy` trait
56    |                          help: consider borrowing here: `&arr[0]`
57
58 error[E0507]: cannot move out of `*r` which is behind a shared reference
59   --> $DIR/cannot-move-block-spans.rs:17:38
60    |
61 LL |     let x = { let mut u = 0; u += 1; *r };
62    |                                      ^^
63    |                                      |
64    |                                      move occurs because `*r` has type `std::string::String`, which does not implement the `Copy` trait
65    |                                      help: consider removing the `*`: `r`
66
67 error[E0507]: cannot move out of `*r` which is behind a shared reference
68   --> $DIR/cannot-move-block-spans.rs:18:45
69    |
70 LL |     let y = unsafe { let mut u = 0; u += 1; *r };
71    |                                             ^^
72    |                                             |
73    |                                             move occurs because `*r` has type `std::string::String`, which does not implement the `Copy` trait
74    |                                             help: consider removing the `*`: `r`
75
76 error[E0507]: cannot move out of `*r` which is behind a shared reference
77   --> $DIR/cannot-move-block-spans.rs:19:49
78    |
79 LL |     let z = loop { let mut u = 0; u += 1; break *r; u += 2; };
80    |                                                 ^^
81    |                                                 |
82    |                                                 move occurs because `*r` has type `std::string::String`, which does not implement the `Copy` trait
83    |                                                 help: consider removing the `*`: `r`
84
85 error: aborting due to 9 previous errors
86
87 Some errors have detailed explanations: E0507, E0508.
88 For more information about an error, try `rustc --explain E0507`.