]> git.lizzy.rs Git - rust.git/blob - tests/fail/stacked_borrows/static_memory_modification.rs
pointer tag tracking: on creation, log the offsets it is created for
[rust.git] / tests / fail / stacked_borrows / static_memory_modification.rs
1 static X: usize = 5;
2
3 #[allow(mutable_transmutes)]
4 fn main() {
5     let _x = unsafe {
6         std::mem::transmute::<&usize, &mut usize>(&X) //~ ERROR writing to alloc1 which is read-only
7     };
8 }