Rebase fallout: new tests need updated ui output

This commit is contained in:
Oliver Schneider 2018-07-17 13:46:48 +02:00
parent 07e2dd7d96
commit 1fc7580a8e
6 changed files with 23 additions and 15 deletions

View File

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

View File

@ -1,8 +1,10 @@
error[E0018]: raw pointers cannot be cast to integers in constants
error[E0658]: casting pointers to integers in constants is unstable (see issue #51910)
--> $DIR/match-test-ptr-null.rs:16:15
|
LL | match &1 as *const i32 as usize { //~ ERROR raw pointers cannot be cast to integers
LL | match &1 as *const i32 as usize { //~ ERROR casting pointers to integers in constants
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(const_raw_ptr_to_usize_cast)] to the crate attributes to enable
error[E0019]: constant contains unimplemented expression type
--> $DIR/match-test-ptr-null.rs:17:13
@ -15,7 +17,7 @@ error[E0080]: could not evaluate repeat length
|
LL | let _: [u8; 0] = [4; { //~ ERROR could not evaluate repeat length
| __________________________^
LL | | match &1 as *const i32 as usize { //~ ERROR raw pointers cannot be cast to integers
LL | | match &1 as *const i32 as usize { //~ ERROR casting pointers to integers in constants
LL | | 0 => 42, //~ ERROR constant contains unimplemented expression type
| | - "pointer arithmetic or comparison" needs an rfc before being allowed inside constants
LL | | //~^ NOTE "pointer arithmetic or comparison" needs an rfc before being allowed
@ -26,5 +28,5 @@ LL | | }];
error: aborting due to 3 previous errors
Some errors occurred: E0018, E0019, E0080.
For more information about an error, try `rustc --explain E0018`.
Some errors occurred: E0019, E0080, E0658.
For more information about an error, try `rustc --explain E0019`.

View File

@ -1,9 +1,11 @@
error[E0018]: raw pointers cannot be cast to integers in statics
error[E0658]: casting pointers to integers in statics is unstable (see issue #51910)
--> $DIR/issue-17458.rs:11:19
|
LL | static X: usize = 0 as *const usize as usize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(const_raw_ptr_to_usize_cast)] to the crate attributes to enable
error: aborting due to previous error
For more information about this error, try `rustc --explain E0018`.
For more information about this error, try `rustc --explain E0658`.

View File

@ -1,9 +1,11 @@
error[E0018]: raw pointers cannot be cast to integers in constants
error[E0658]: casting pointers to integers in constants is unstable (see issue #51910)
--> $DIR/issue-18294.rs:13:22
|
LL | const Y: usize = &X as *const u32 as usize; //~ ERROR E0018
LL | const Y: usize = &X as *const u32 as usize; //~ ERROR is unstable
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(const_raw_ptr_to_usize_cast)] to the crate attributes to enable
error: aborting due to previous error
For more information about this error, try `rustc --explain E0018`.
For more information about this error, try `rustc --explain E0658`.

View File

@ -9,5 +9,5 @@
// except according to those terms.
fn main() {
let _ = [0; (&0 as *const i32) as usize]; //~ ERROR raw pointers cannot be cast
let _ = [0; (&0 as *const i32) as usize]; //~ ERROR casting pointers to integers in constants
}

View File

@ -1,9 +1,11 @@
error[E0018]: raw pointers cannot be cast to integers in constants
error[E0658]: casting pointers to integers in constants is unstable (see issue #51910)
--> $DIR/issue-52023-array-size-pointer-cast.rs:12:17
|
LL | let _ = [0; (&0 as *const i32) as usize]; //~ ERROR raw pointers cannot be cast
LL | let _ = [0; (&0 as *const i32) as usize]; //~ ERROR casting pointers to integers in constants
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(const_raw_ptr_to_usize_cast)] to the crate attributes to enable
error: aborting due to previous error
For more information about this error, try `rustc --explain E0018`.
For more information about this error, try `rustc --explain E0658`.