Skip to content

Commit d34924d

Browse files
committed
update tests
1 parent 086c2d0 commit d34924d

File tree

3 files changed

+28
-11
lines changed

3 files changed

+28
-11
lines changed

src/test/ui/issue-20801.nll.stderr

+22-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,27 @@
1-
error: internal compiler error: Accessing `(*_8)` with the kind `Write(Move)` shouldn't be possible
1+
error[E0507]: cannot move out of borrowed content
2+
--> $DIR/issue-20801.rs:36:22
3+
|
4+
LL | let a = unsafe { *mut_ref() };
5+
| ^^^^^^^^^^ cannot move out of borrowed content
6+
7+
error[E0507]: cannot move out of borrowed content
8+
--> $DIR/issue-20801.rs:39:22
9+
|
10+
LL | let b = unsafe { *imm_ref() };
11+
| ^^^^^^^^^^ cannot move out of borrowed content
12+
13+
error[E0507]: cannot move out of borrowed content
14+
--> $DIR/issue-20801.rs:42:22
15+
|
16+
LL | let c = unsafe { *mut_ptr() };
17+
| ^^^^^^^^^^ cannot move out of borrowed content
18+
19+
error[E0507]: cannot move out of borrowed content
220
--> $DIR/issue-20801.rs:45:22
321
|
422
LL | let d = unsafe { *const_ptr() };
5-
| ^^^^^^^^^^^^
23+
| ^^^^^^^^^^^^ cannot move out of borrowed content
624

7-
error: aborting due to previous error
25+
error: aborting due to 4 previous errors
826

27+
For more information about this error, try `rustc --explain E0507`.

src/test/ui/issue-20801.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// ignore-test currently ICEs when using NLL (#52416)
12-
1311
// We used to ICE when moving out of a `*mut T` or `*const T`.
1412

1513
struct T(u8);

src/test/ui/issue-30355.nll.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
error[E0508]: cannot move out of type `[u8]`, a non-copy slice
2-
--> $DIR/issue-30355.rs:15:8
3-
|
4-
LL | &X(*Y)
5-
| ^^ cannot move out of here
6-
71
error[E0161]: cannot move a value of type X: the size of X cannot be statically determined
82
--> $DIR/issue-30355.rs:15:6
93
|
@@ -16,6 +10,12 @@ error[E0161]: cannot move a value of type [u8]: the size of [u8] cannot be stati
1610
LL | &X(*Y)
1711
| ^^
1812

13+
error[E0508]: cannot move out of type `[u8]`, a non-copy slice
14+
--> $DIR/issue-30355.rs:15:8
15+
|
16+
LL | &X(*Y)
17+
| ^^ cannot move out of here
18+
1919
error: aborting due to 3 previous errors
2020

2121
Some errors occurred: E0161, E0508.

0 commit comments

Comments
 (0)