Feature gate: #![feature(const_replace)]
This is a tracking issue for making the functions mem::replace and ptr::replace const fn.
Public API
mod mem {
pub const fn replace<T>(dest: &mut T, src: T) -> T;
}
mod ptr {
pub const unsafe fn replace<T>(dst: *mut T, mut src: T) -> T;
}
Steps / History
Unresolved Questions
Feature gate:
#![feature(const_replace)]This is a tracking issue for making the functions
mem::replaceandptr::replaceconst fn.Public API
Steps / History
copyrelated functions #83091ptr::write*andmem::replace#130954Unresolved Questions