-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Closed
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
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<T>(dst: *mut T, src: T);
pub const unsafe fn write_unaligned<T>(dst: *mut T, src: T);
pub const unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize);
}
impl<T> *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 <T> NonNull<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);
}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_bytesakaptr::write_bytes- Makeintrinsics::write_bytesconst #90081 -
(*mut T)::write_bytes- Make(*mut T)::write_bytesconst#91824 - blocked on Tracking issue for
&mut Tin const contexts (const_mut_refs) #57349 -
NonNullmethods stabilized,constness moved to this gate Stabilizenon_null_convenience#124498 - Final commenting period (FCP)
- Stabilization PR
Related
- const_ptr_read Tracking Issue for const_ptr_read #80377
Unresolved Questions
- None yet.
ohsayan, c410-f3r and orzogcbjoernager
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.