rust/tests/compile-fail/ptr_rem.rs
2018-08-14 20:10:25 +02:00

6 lines
156 B
Rust

fn main() {
let val = 13usize;
let addr = &val as *const _ as usize;
let _ = addr % 16; //~ ERROR access part of a pointer value as raw bytes
}