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
@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
@tgross35 tgross35 added the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Oct 27, 2024
@tgross35
Copy link
Contributor Author

Cc @rust-lang/wg-const-eval for this one as well

@RalfJung
Copy link
Member

RalfJung commented Oct 30, 2024 via email

@RalfJung
Copy link
Member

@rust-lang/libs-api could someone start FCP? :) Should be uncontroversial, the function has been stable for a while and this just makes it const-stable.

@dtolnay
Copy link
Member

dtolnay commented Oct 30, 2024

@rfcbot fcp merge

@rfcbot
Copy link

rfcbot commented Oct 30, 2024

Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Oct 30, 2024
@dtolnay dtolnay removed the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Oct 30, 2024
@dtolnay dtolnay assigned dtolnay and unassigned BurntSushi Oct 30, 2024
@dtolnay dtolnay added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 21, 2024
@RalfJung
Copy link
Member

@BurntSushi @joshtriplett @m-ou-se friendly FCP checkbox reminder :)

@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Nov 22, 2024
@rfcbot
Copy link

rfcbot commented Nov 22, 2024

🔔 This is now entering its final comment period, as per the review above. 🔔

@dtolnay dtolnay removed the S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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