Skip to content

Tracking issue for #![feature(maybe_uninit_extra,const_maybe_uninit_write)] #63567

Closed
Listed in
@Centril

Description

@Centril
Contributor

This is a tracking issue for the RFC "Deprecate uninitialized in favor of a new MaybeUninit type" (rust-lang/rfcs#1892).

This issue specifically tracks the following unstable methods:

impl<T> MaybeUninit<T> {
    pub unsafe fn assume_init_read(&self) -> T { ... }
    pub unsafe fn assume_init_drop(&mut self) { ... }
}

and it tracks const-ness of

impl<T> MaybeUninit<T> {
    pub const fn write(&mut self, val: T) -> &mut T { ... }
}

Activity

added
T-langRelevant to the language team
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.
B-unstableBlocker: Implemented in the nightly compiler and unstable.
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
requires-nightlyThis issue requires a nightly compiler in some way.
on Aug 14, 2019
RalfJung

RalfJung commented on Aug 14, 2019

@RalfJung
Member

Latest status here:

I am beginning to think that read should probably be renamed to read_init or read_assume_init or so, something that indicates that this may only be done after initialization is complete.

added 2 commits that reference this issue on Aug 14, 2019

Rollup merge of rust-lang#63570 - rust-lang:maybe-uninit-gates, r=Ral…

72e69f8

Rollup merge of rust-lang#63570 - rust-lang:maybe-uninit-gates, r=Ral…

78cd9d1
SimonSapin

SimonSapin commented on Oct 18, 2019

@SimonSapin
Contributor

@RalfJung Should the same logic apply to get_ref and get_mut? #63568

RalfJung

RalfJung commented on Oct 19, 2019

@RalfJung
Member

That depends on whether references to invalid data are UB or not. If yes, then certainly. If not, then maybe.

Currently they are UB but that's just because it is the more conservative choice.

added
Libs-TrackedLibs issues that are tracked on the team's project board.
A-raw-pointersArea: raw pointers, MaybeUninit, NonNull
on Jul 30, 2020

142 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-raw-pointersArea: raw pointers, MaybeUninit, NonNullB-unstableBlocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCLibs-TrackedLibs issues that are tracked on the team's project board.T-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.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @joshtriplett@Amanieu@SimonSapin@RalfJung@faern

      Issue actions

        Tracking issue for `#![feature(maybe_uninit_extra,const_maybe_uninit_write)]` · Issue #63567 · rust-lang/rust