Files
rust/tests/compile-fail/pointers_to_different_allocations_are_unorderable.rs
2016-06-13 15:33:05 +02:00

8 lines
199 B
Rust

fn main() {
let x: *const u8 = &1;
let y: *const u8 = &2;
if x < y { //~ ERROR: attempted to do math or a comparison on pointers into different allocations
unreachable!()
}
}