Function std::intrinsics::retag_box_to_raw
source · pub unsafe fn retag_box_to_raw<T, A>(ptr: *mut T) -> *mut Twhere
T: ?Sized,
🔬This is a nightly-only experimental API. (
core_intrinsics
)Expand description
Retag a box pointer as part of casting it to a raw pointer. This is the Box
equivalent of
(x: &mut T) as *mut T
. The input pointer must be the pointer of a Box
(passed as raw pointer
to avoid all questions around move semantics and custom allocators), and A
must be the Box
’s
allocator.