]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/cannot-move-block-spans.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / nll / cannot-move-block-spans.stderr
1 error[E0507]: cannot move out of borrowed content
2   --> $DIR/cannot-move-block-spans.rs:15:15
3    |
4 LL |     let x = { *r }; //~ ERROR
5    |               ^^ cannot move out of borrowed content
6
7 error[E0507]: cannot move out of borrowed content
8   --> $DIR/cannot-move-block-spans.rs:16:22
9    |
10 LL |     let y = unsafe { *r }; //~ ERROR
11    |                      ^^ cannot move out of borrowed content
12
13 error[E0507]: cannot move out of borrowed content
14   --> $DIR/cannot-move-block-spans.rs:17:26
15    |
16 LL |     let z = loop { break *r; }; //~ ERROR
17    |                          ^^ cannot move out of borrowed content
18
19 error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array
20   --> $DIR/cannot-move-block-spans.rs:21:15
21    |
22 LL |     let x = { arr[0] }; //~ ERROR
23    |               ^^^^^^ cannot move out of here
24
25 error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array
26   --> $DIR/cannot-move-block-spans.rs:22:22
27    |
28 LL |     let y = unsafe { arr[0] }; //~ ERROR
29    |                      ^^^^^^ cannot move out of here
30
31 error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array
32   --> $DIR/cannot-move-block-spans.rs:23:26
33    |
34 LL |     let z = loop { break arr[0]; }; //~ ERROR
35    |                          ^^^^^^ cannot move out of here
36
37 error[E0507]: cannot move out of borrowed content
38   --> $DIR/cannot-move-block-spans.rs:27:38
39    |
40 LL |     let x = { let mut u = 0; u += 1; *r }; //~ ERROR
41    |                                      ^^ cannot move out of borrowed content
42
43 error[E0507]: cannot move out of borrowed content
44   --> $DIR/cannot-move-block-spans.rs:28:45
45    |
46 LL |     let y = unsafe { let mut u = 0; u += 1; *r }; //~ ERROR
47    |                                             ^^ cannot move out of borrowed content
48
49 error[E0507]: cannot move out of borrowed content
50   --> $DIR/cannot-move-block-spans.rs:29:49
51    |
52 LL |     let z = loop { let mut u = 0; u += 1; break *r; u += 2; }; //~ ERROR
53    |                                                 ^^ cannot move out of borrowed content
54
55 error: aborting due to 9 previous errors
56
57 Some errors occurred: E0507, E0508.
58 For more information about an error, try `rustc --explain E0507`.