Function std::ptr::swap
[−]
[src]
pub unsafe fn swap<T>(x: *mut T, y: *mut T)
Swaps the values at two mutable locations of the same type, without
deinitializing either. They may overlap, unlike mem::swap
which is
otherwise equivalent.
Safety
This is only unsafe because it accepts a raw pointer.