Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize const_maybe_uninit_write #131713

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Oct 14, 2024

Mark the following API const stable:

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

This depends on const_mut_refs and const_maybe_uninit_assume_init, both of which have recently been stabilized.

Closes: #63567

r? libs-api

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 14, 2024
@tgross35
Copy link
Contributor Author

tgross35 commented Oct 14, 2024

The other methods from #63567 have already been stabilized, but this needs FCP. I will be able to drop the enable for const_mut_refs after the bootstrap bump.

@tgross35 tgross35 added needs-fcp This change is insta-stable, so needs a completed FCP to proceed. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 14, 2024
#[inline(always)]
#[stable(feature = "maybe_uninit_write", since = "1.55.0")]
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be possible to remove the rustc_allow_const_fn_unstable now the stage0 compiler has been updated.

@bors
Copy link
Contributor

bors commented Oct 18, 2024

☔ The latest upstream changes (presumably #131887) made this pull request unmergeable. Please resolve the merge conflicts.

Mark the following API const stable:

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

This depends on `const_mut_refs` and `const_maybe_uninit_assume_init`,
both of which have recently been stabilized.

Tracking issue: <rust-lang#63567>
@tgross35 tgross35 force-pushed the stabilize-const_maybe_uninit_write branch from 1ed32c5 to 7808838 Compare October 18, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-fcp This change is insta-stable, so needs a completed FCP to proceed. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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