use bytemuck::TransparentWrapper; #[repr(transparent)] struct Wrap(Box); // SAFETY: it's #[repr(transparent)] unsafe impl TransparentWrapper> for Wrap {} fn main() { let value = Box::new(5); // This used to duplicate the wrapped value, creating a double free :( Wrap::wrap(value); }