Closed
Description
opened on Mar 15, 2021
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
- Implementation: Constify
copy
related functions #83091 - Final commenting period (FCP)
- Stabilization PR - Stabilize const
ptr::write*
andmem::replace
#130954
Unresolved Questions
- None yet.
Activity