Skip to content

Commit 1fc7580

Browse files
committed
Rebase fallout: new tests need updated ui output
1 parent 07e2dd7 commit 1fc7580

6 files changed

+23
-15
lines changed

src/test/ui/const-eval/match-test-ptr-null.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fn main() {
1313
// that pointer comparison is disallowed, not that parts of a pointer are accessed as raw
1414
// bytes.
1515
let _: [u8; 0] = [4; { //~ ERROR could not evaluate repeat length
16-
match &1 as *const i32 as usize { //~ ERROR raw pointers cannot be cast to integers
16+
match &1 as *const i32 as usize { //~ ERROR casting pointers to integers in constants
1717
0 => 42, //~ ERROR constant contains unimplemented expression type
1818
//~^ NOTE "pointer arithmetic or comparison" needs an rfc before being allowed
1919
n => n,

src/test/ui/const-eval/match-test-ptr-null.stderr

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
error[E0018]: raw pointers cannot be cast to integers in constants
1+
error[E0658]: casting pointers to integers in constants is unstable (see issue #51910)
22
--> $DIR/match-test-ptr-null.rs:16:15
33
|
4-
LL | match &1 as *const i32 as usize { //~ ERROR raw pointers cannot be cast to integers
4+
LL | match &1 as *const i32 as usize { //~ ERROR casting pointers to integers in constants
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= help: add #![feature(const_raw_ptr_to_usize_cast)] to the crate attributes to enable
68

79
error[E0019]: constant contains unimplemented expression type
810
--> $DIR/match-test-ptr-null.rs:17:13
@@ -15,7 +17,7 @@ error[E0080]: could not evaluate repeat length
1517
|
1618
LL | let _: [u8; 0] = [4; { //~ ERROR could not evaluate repeat length
1719
| __________________________^
18-
LL | | match &1 as *const i32 as usize { //~ ERROR raw pointers cannot be cast to integers
20+
LL | | match &1 as *const i32 as usize { //~ ERROR casting pointers to integers in constants
1921
LL | | 0 => 42, //~ ERROR constant contains unimplemented expression type
2022
| | - "pointer arithmetic or comparison" needs an rfc before being allowed inside constants
2123
LL | | //~^ NOTE "pointer arithmetic or comparison" needs an rfc before being allowed
@@ -26,5 +28,5 @@ LL | | }];
2628

2729
error: aborting due to 3 previous errors
2830

29-
Some errors occurred: E0018, E0019, E0080.
30-
For more information about an error, try `rustc --explain E0018`.
31+
Some errors occurred: E0019, E0080, E0658.
32+
For more information about an error, try `rustc --explain E0019`.

src/test/ui/issue-17458.stderr

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
error[E0018]: raw pointers cannot be cast to integers in statics
1+
error[E0658]: casting pointers to integers in statics is unstable (see issue #51910)
22
--> $DIR/issue-17458.rs:11:19
33
|
44
LL | static X: usize = 0 as *const usize as usize;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= help: add #![feature(const_raw_ptr_to_usize_cast)] to the crate attributes to enable
68

79
error: aborting due to previous error
810

9-
For more information about this error, try `rustc --explain E0018`.
11+
For more information about this error, try `rustc --explain E0658`.

src/test/ui/issue-18294.stderr

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
error[E0018]: raw pointers cannot be cast to integers in constants
1+
error[E0658]: casting pointers to integers in constants is unstable (see issue #51910)
22
--> $DIR/issue-18294.rs:13:22
33
|
4-
LL | const Y: usize = &X as *const u32 as usize; //~ ERROR E0018
4+
LL | const Y: usize = &X as *const u32 as usize; //~ ERROR is unstable
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= help: add #![feature(const_raw_ptr_to_usize_cast)] to the crate attributes to enable
68

79
error: aborting due to previous error
810

9-
For more information about this error, try `rustc --explain E0018`.
11+
For more information about this error, try `rustc --explain E0658`.

src/test/ui/issue-52023-array-size-pointer-cast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
// except according to those terms.
1010

1111
fn main() {
12-
let _ = [0; (&0 as *const i32) as usize]; //~ ERROR raw pointers cannot be cast
12+
let _ = [0; (&0 as *const i32) as usize]; //~ ERROR casting pointers to integers in constants
1313
}
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
error[E0018]: raw pointers cannot be cast to integers in constants
1+
error[E0658]: casting pointers to integers in constants is unstable (see issue #51910)
22
--> $DIR/issue-52023-array-size-pointer-cast.rs:12:17
33
|
4-
LL | let _ = [0; (&0 as *const i32) as usize]; //~ ERROR raw pointers cannot be cast
4+
LL | let _ = [0; (&0 as *const i32) as usize]; //~ ERROR casting pointers to integers in constants
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= help: add #![feature(const_raw_ptr_to_usize_cast)] to the crate attributes to enable
68

79
error: aborting due to previous error
810

9-
For more information about this error, try `rustc --explain E0018`.
11+
For more information about this error, try `rustc --explain E0658`.

0 commit comments

Comments
 (0)