Skip to content

Commit af2b42d

Browse files
committed
fix compile-fail test
1 parent 378d9d4 commit af2b42d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/compile-fail/ptr_eq_integer.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
use std::mem;
2-
31
fn main() {
42
let b = Box::new(0);
53
let x = &*b as *const i32;
64
// We cannot compare this with a non-NULL integer. After all, these *could* be equal (with the right base address).
7-
assert!(x != mem::align_of::<i32>() as *const i32); //~ ERROR invalid arithmetic on pointers
5+
assert!(x != 64 as *const i32); //~ ERROR invalid arithmetic on pointers
86
}

0 commit comments

Comments
 (0)