Function core::ptr::replace [] [src]

pub unsafe fn replace<T>(dest: *mut T, src: T) -> T
1.0.0

Replaces the value at dest with src, returning the old value, without dropping either.

Safety

This is only unsafe because it accepts a raw pointer. Otherwise, this operation is identical to mem::replace.