rust/src/test/ui/nll/cannot-move-block-spans.stderr

59 lines
2.2 KiB
Plaintext
Raw Normal View History

error[E0507]: cannot move out of borrowed content
--> $DIR/cannot-move-block-spans.rs:15:15
|
LL | let x = { *r }; //~ ERROR
| ^^ cannot move out of borrowed content
error[E0507]: cannot move out of borrowed content
--> $DIR/cannot-move-block-spans.rs:16:22
|
LL | let y = unsafe { *r }; //~ ERROR
| ^^ cannot move out of borrowed content
error[E0507]: cannot move out of borrowed content
--> $DIR/cannot-move-block-spans.rs:17:26
|
LL | let z = loop { break *r; }; //~ ERROR
| ^^ cannot move out of borrowed content
error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array
--> $DIR/cannot-move-block-spans.rs:21:15
|
LL | let x = { arr[0] }; //~ ERROR
| ^^^^^^ cannot move out of here
error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array
--> $DIR/cannot-move-block-spans.rs:22:22
|
LL | let y = unsafe { arr[0] }; //~ ERROR
| ^^^^^^ cannot move out of here
error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array
--> $DIR/cannot-move-block-spans.rs:23:26
|
LL | let z = loop { break arr[0]; }; //~ ERROR
| ^^^^^^ cannot move out of here
error[E0507]: cannot move out of borrowed content
--> $DIR/cannot-move-block-spans.rs:27:38
|
LL | let x = { let mut u = 0; u += 1; *r }; //~ ERROR
| ^^ cannot move out of borrowed content
error[E0507]: cannot move out of borrowed content
--> $DIR/cannot-move-block-spans.rs:28:45
|
LL | let y = unsafe { let mut u = 0; u += 1; *r }; //~ ERROR
| ^^ cannot move out of borrowed content
error[E0507]: cannot move out of borrowed content
--> $DIR/cannot-move-block-spans.rs:29:49
|
LL | let z = loop { let mut u = 0; u += 1; break *r; u += 2; }; //~ ERROR
| ^^ cannot move out of borrowed content
error: aborting due to 9 previous errors
Some errors occurred: E0507, E0508.
For more information about an error, try `rustc --explain E0507`.