Tracking Issue for const_ptr_write · Issue #86302 · rust-lang/rust (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
Feature gate: #![feature(const_ptr_write)]
This is a tracking issue for making the functions ptr::write
and ptr::write_unaligned
, and the same methods on *mut T
, const fn
.
Public API
mod ptr { pub const unsafe fn write(dst: *mut T, src: T); pub const unsafe fn write_unaligned(dst: *mut T, src: T); pub const unsafe fn write_bytes(dst: *mut T, val: u8, count: usize); }
impl *mut T { pub const unsafe fn write(self, val: T); pub const unsafe fn write_unaligned(self, val: T); pub const unsafe fn write_bytes(self, val: u8, count: usize); }
impl NonNull { pub const unsafe fn write(self, val: T); pub const unsafe fn write_unaligned(self, val: T); pub const unsafe fn write_bytes(self, val: u8, count: usize); }
Steps / History
- Implementation: Make ptr::write const #81167
- Reverted: Make copy/copy_nonoverlapping fn's again #86003
- Re-constified: Revert revert of constness in #86003 #86295
core::intrinsics::write_bytes
akaptr::write_bytes
- Make intrinsics::write_bytes const #90081(*mut T)::write_bytes
- Make (*mut T)::write_bytes const #91824- blocked on Tracking issue for &mut T in const contexts (const_mut_refs) #57349
NonNull
methods stabilized,const
ness moved to this gate Stabilize non_null_convenience #124498- Final commenting period (FCP)
- Stabilization PR
Related
- const_ptr_read Tracking Issue for const_ptr_read #80377
Unresolved Questions
- None yet.