]>
Commit | Line | Data |
---|---|---|
ea8adc8c XL |
1 | fn main() { |
2 | let x = 13; | |
3 | let y = &x; | |
4 | let z = &y as *const &i32 as *const usize; | |
5 | let ptr_bytes = unsafe { *z }; // the actual deref is fine, because we read the entire pointer at once | |
6 | let _ = ptr_bytes % 432; //~ ERROR: tried to access part of a pointer value as raw bytes | |
7 | } |