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

59 lines
2.1 KiB
Plaintext
Raw Normal View History

error[E0507]: cannot move out of borrowed content
2018-12-25 15:56:47 +00:00
--> $DIR/cannot-move-block-spans.rs:5:15
|
2019-03-09 12:03:44 +00:00
LL | let x = { *r };
| ^^ cannot move out of borrowed content
error[E0507]: cannot move out of borrowed content
2018-12-25 15:56:47 +00:00
--> $DIR/cannot-move-block-spans.rs:6:22
|
2019-03-09 12:03:44 +00:00
LL | let y = unsafe { *r };
| ^^ cannot move out of borrowed content
error[E0507]: cannot move out of borrowed content
2018-12-25 15:56:47 +00:00
--> $DIR/cannot-move-block-spans.rs:7:26
|
2019-03-09 12:03:44 +00:00
LL | let z = loop { break *r; };
| ^^ cannot move out of borrowed content
error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array
2018-12-25 15:56:47 +00:00
--> $DIR/cannot-move-block-spans.rs:11:15
|
2019-03-09 12:03:44 +00:00
LL | let x = { arr[0] };
| ^^^^^^ cannot move out of here
error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array
2018-12-25 15:56:47 +00:00
--> $DIR/cannot-move-block-spans.rs:12:22
|
2019-03-09 12:03:44 +00:00
LL | let y = unsafe { arr[0] };
| ^^^^^^ cannot move out of here
error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array
2018-12-25 15:56:47 +00:00
--> $DIR/cannot-move-block-spans.rs:13:26
|
2019-03-09 12:03:44 +00:00
LL | let z = loop { break arr[0]; };
| ^^^^^^ cannot move out of here
error[E0507]: cannot move out of borrowed content
2018-12-25 15:56:47 +00:00
--> $DIR/cannot-move-block-spans.rs:17:38
|
2019-03-09 12:03:44 +00:00
LL | let x = { let mut u = 0; u += 1; *r };
| ^^ cannot move out of borrowed content
error[E0507]: cannot move out of borrowed content
2018-12-25 15:56:47 +00:00
--> $DIR/cannot-move-block-spans.rs:18:45
|
2019-03-09 12:03:44 +00:00
LL | let y = unsafe { let mut u = 0; u += 1; *r };
| ^^ cannot move out of borrowed content
error[E0507]: cannot move out of borrowed content
2018-12-25 15:56:47 +00:00
--> $DIR/cannot-move-block-spans.rs:19:49
|
2019-03-09 12:03:44 +00:00
LL | let z = loop { let mut u = 0; u += 1; break *r; u += 2; };
| ^^ 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`.