1 //! Test that drop_in_place retags the entire place,
2 //! invalidating all aliases to it.
4 // A zero-sized drop type -- the retagging of `fn drop` itself won't
5 // do anything (since it is zero-sized); we are entirely relying on the retagging
6 // in `drop_in_place` here.
9 impl Drop for HasDrop {
13 //~^ ERROR: /not granting access .* because that would remove .* which is strongly protected/
18 static mut P: *mut u8 = core::ptr::null_mut();
22 let mut x = (HasDrop, 0u8);
23 let x = core::ptr::addr_of_mut!(x);
25 core::ptr::drop_in_place(x);