Skip to content

Commit 4c4e1ef

Browse files
committed
Add files I forgot to commit earlier
1 parent 671d7e0 commit 4c4e1ef

File tree

6 files changed

+99
-0
lines changed

6 files changed

+99
-0
lines changed

src/test/ui/E0508-fail.ast.nll.stderr

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array
2+
--> $DIR/E0508-fail.rs:18:18
3+
|
4+
LL | let _value = array[0]; //[ast]~ ERROR [E0508]
5+
| ^^^^^^^^
6+
| |
7+
| cannot move out of here
8+
| help: consider borrowing here: `&array[0]`
9+
10+
error: aborting due to previous error
11+
12+
For more information about this error, try `rustc --explain E0508`.

src/test/ui/E0508.nll.stderr

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array
2+
--> $DIR/E0508.rs:15:18
3+
|
4+
LL | let _value = array[0]; //~ ERROR [E0508]
5+
| ^^^^^^^^
6+
| |
7+
| cannot move out of here
8+
| help: consider borrowing here: `&array[0]`
9+
10+
error: aborting due to previous error
11+
12+
For more information about this error, try `rustc --explain E0508`.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
error[E0507]: cannot move out of borrowed content
2+
--> $DIR/borrowck-move-out-of-overloaded-deref.rs:14:14
3+
|
4+
LL | let _x = *Rc::new("hi".to_string());
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
| |
7+
| cannot move out of borrowed content
8+
| help: consider removing the `*`: `Rc::new("hi".to_string())`
9+
10+
error: aborting due to previous error
11+
12+
For more information about this error, try `rustc --explain E0507`.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
error[E0509]: cannot move out of type `DropStruct`, which implements the `Drop` trait
2+
--> $DIR/E0509.rs:26:23
3+
|
4+
LL | let fancy_field = drop_struct.fancy; //~ ERROR E0509
5+
| ^^^^^^^^^^^^^^^^^
6+
| |
7+
| cannot move out of here
8+
| help: consider borrowing here: `&drop_struct.fancy`
9+
10+
error: aborting due to previous error
11+
12+
For more information about this error, try `rustc --explain E0509`.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
error[E0507]: cannot move out of static item
2+
--> $DIR/issue-17718-static-move.rs:16:14
3+
|
4+
LL | let _a = FOO; //~ ERROR: cannot move out of static item
5+
| ^^^
6+
| |
7+
| cannot move out of static item
8+
| help: consider borrowing here: `&FOO`
9+
10+
error: aborting due to previous error
11+
12+
For more information about this error, try `rustc --explain E0507`.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
error[E0507]: cannot move out of borrowed content
2+
--> $DIR/std-uncopyable-atomics.rs:19:13
3+
|
4+
LL | let x = *&x; //~ ERROR: cannot move out of borrowed content
5+
| ^^^
6+
| |
7+
| cannot move out of borrowed content
8+
| help: consider removing the `*`: `&x`
9+
10+
error[E0507]: cannot move out of borrowed content
11+
--> $DIR/std-uncopyable-atomics.rs:21:13
12+
|
13+
LL | let x = *&x; //~ ERROR: cannot move out of borrowed content
14+
| ^^^
15+
| |
16+
| cannot move out of borrowed content
17+
| help: consider removing the `*`: `&x`
18+
19+
error[E0507]: cannot move out of borrowed content
20+
--> $DIR/std-uncopyable-atomics.rs:23:13
21+
|
22+
LL | let x = *&x; //~ ERROR: cannot move out of borrowed content
23+
| ^^^
24+
| |
25+
| cannot move out of borrowed content
26+
| help: consider removing the `*`: `&x`
27+
28+
error[E0507]: cannot move out of borrowed content
29+
--> $DIR/std-uncopyable-atomics.rs:25:13
30+
|
31+
LL | let x = *&x; //~ ERROR: cannot move out of borrowed content
32+
| ^^^
33+
| |
34+
| cannot move out of borrowed content
35+
| help: consider removing the `*`: `&x`
36+
37+
error: aborting due to 4 previous errors
38+
39+
For more information about this error, try `rustc --explain E0507`.

0 commit comments

Comments
 (0)