Skip to main content

ptr_mut_add

Function ptr_mut_add 

Source
pub unsafe exec fn ptr_mut_add<T>(p: *mut T, count: usize) -> *mut T
Expand description
requires
p.addr() + count * size_of::<T>() <= usize::MAX,
count * size_of::<T>() <= isize::MAX,
returns
ptr_mut_add_spec(p, count),

Temporary xAPIC workaround until vstd supports wrapping_add. Do not reuse elsewhere.

§Safety

Uphold pointer::add’s allocation and arithmetic requirements.