2018-09-15 10:12:48 -05:00
|
|
|
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).
|
2019-04-16 12:09:37 -05:00
|
|
|
assert!(x != 64 as *const i32); //~ ERROR invalid arithmetic on pointers
|
2018-09-15 10:12:48 -05:00
|
|
|
}
|