rust/tests/compile-fail/ptr_bitops2.rs

6 lines
159 B
Rust
Raw Normal View History

fn main() {
let val = 13usize;
let addr = &val as *const _ as usize;
2018-11-26 08:31:53 -06:00
let _val = addr & 13; //~ ERROR access part of a pointer value as raw bytes
}