fix compile-fail test
This commit is contained in:
parent
378d9d4172
commit
af2b42de0a
1 changed files with 1 additions and 3 deletions
|
|
@ -1,8 +1,6 @@
|
|||
use std::mem;
|
||||
|
||||
fn main() {
|
||||
let b = Box::new(0);
|
||||
let x = &*b as *const i32;
|
||||
// We cannot compare this with a non-NULL integer. After all, these *could* be equal (with the right base address).
|
||||
assert!(x != mem::align_of::<i32>() as *const i32); //~ ERROR invalid arithmetic on pointers
|
||||
assert!(x != 64 as *const i32); //~ ERROR invalid arithmetic on pointers
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue