Skip to content

Tracking Issue for const_ptr_write #86302

Closed
@usbalbin

Description

@usbalbin

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

Related

Unresolved Questions

  • None yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: 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.disposition-mergeThis 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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions