core::intrinsics::offsetExperimental [-]  [+] [src]

pub unsafe fn offset<T>(dst: *const T, offset: int) -> *const T

Calculates the offset from a pointer. The offset must be in-bounds of the object, or one-byte-past-the-end. An arithmetic overflow is also undefined behaviour.

This is implemented as an intrinsic to avoid converting to and from an integer, since the conversion would throw away aliasing information.