Skip to content

Commit d410b13

Browse files
committed
fix compile-fail ref files
1 parent 0694435 commit d410b13

9 files changed

+9
-10
lines changed

tests/compile-fail/ctlz_nonzero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ pub fn main() {
1010
unsafe {
1111
use crate::rusti::*;
1212

13-
ctlz_nonzero(0u8); //~ ERROR constant evaluation error: ctlz_nonzero called on 0
13+
ctlz_nonzero(0u8); //~ ERROR ctlz_nonzero called on 0
1414
}
1515
}

tests/compile-fail/cttz_nonzero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ pub fn main() {
1010
unsafe {
1111
use crate::rusti::*;
1212

13-
cttz_nonzero(0u8); //~ ERROR constant evaluation error: cttz_nonzero called on 0
13+
cttz_nonzero(0u8); //~ ERROR cttz_nonzero called on 0
1414
}
1515
}

tests/compile-fail/deref_fn_ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ fn f() {}
22

33
fn main() {
44
let x: u8 = unsafe {
5-
*std::mem::transmute::<fn(), *const u8>(f) //~ ERROR constant evaluation error: tried to dereference a function pointer
5+
*std::mem::transmute::<fn(), *const u8>(f) //~ ERROR tried to dereference a function pointer
66
};
77
panic!("this should never print: {}", x);
88
}

tests/compile-fail/getrandom.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ fn main() {
88
let mut buf = [0u8; 5];
99
unsafe {
1010
libc::syscall(libc::SYS_getrandom, buf.as_mut_ptr() as *mut libc::c_void, 5 as libc::size_t, 0 as libc::c_uint);
11-
//~^ ERROR constant evaluation error: miri does not support gathering system entropy in deterministic mode!
11+
//~^ ERROR miri does not support gathering system entropy in deterministic mode!
1212
}
1313
}

tests/compile-fail/never_transmute_humans.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ struct Human;
77

88
fn main() {
99
let _x: ! = unsafe {
10-
std::mem::transmute::<Human, !>(Human) //~ ERROR constant evaluation error
11-
//^~ NOTE entered unreachable code
10+
std::mem::transmute::<Human, !>(Human) //~ ERROR entered unreachable code
1211
};
1312
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
fn main() {
2-
let x: i32 = unsafe { *std::ptr::null() }; //~ ERROR constant evaluation error: invalid use of NULL pointer
2+
let x: i32 = unsafe { *std::ptr::null() }; //~ ERROR invalid use of NULL pointer
33
panic!("this should never print: {}", x);
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
fn main() {
2-
let x: () = unsafe { *std::ptr::null() }; //~ ERROR constant evaluation error: invalid use of NULL pointer
2+
let x: () = unsafe { *std::ptr::null() }; //~ ERROR invalid use of NULL pointer
33
panic!("this should never print: {:?}", x);
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
fn main() {
2-
unsafe { *std::ptr::null_mut() = 0i32 }; //~ ERROR constant evaluation error: invalid use of NULL pointer
2+
unsafe { *std::ptr::null_mut() = 0i32 }; //~ ERROR invalid use of NULL pointer
33
}

tests/compile-fail/null_pointer_write_zst.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ fn main() {
22
// Not using the () type here, as writes of that type do not even have MIR generated.
33
// Also not assigning directly as that's array initialization, not assignment.
44
let zst_val = [1u8; 0];
5-
unsafe { *std::ptr::null_mut() = zst_val }; //~ ERROR constant evaluation error: invalid use of NULL pointer
5+
unsafe { *std::ptr::null_mut() = zst_val }; //~ ERROR invalid use of NULL pointer
66
}

0 commit comments

Comments
 (0)