[src]

std::intrinsics::offset

pub extern fn offset<T>(dst: *T, offset: int) -> *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.