1 // Make sure we cannot use raw ptrs to access a local that
2 // we took the direct address of.
main()3 fn main() {
4 let mut x = 42;
5 let raw = &mut x as *mut i32 as usize as *mut i32;
6 let _ptr = &mut x;
7 unsafe { *raw = 13; } //~ ERROR borrow stack
8 }
9