Function std::ptr::swap
[−]
[src]
pub unsafe fn swap<T>(x: *mut T, y: *mut T)1.0.0
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.