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

Merged
merged 1 commit into from
Dec 3, 2024

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.

@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
@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Dec 2, 2024
@rfcbot
Copy link

rfcbot commented Dec 2, 2024

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

This will be merged soon.

@RalfJung
Copy link
Member

RalfJung commented Dec 2, 2024

FCP passed, should be good to go then. :)

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 2, 2024

📌 Commit 7808838 has been approved by RalfJung

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Dec 2, 2024
@bors
Copy link
Contributor

bors commented Dec 2, 2024

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

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 2, 2024
@tgross35
Copy link
Contributor Author

tgross35 commented Dec 2, 2024

Timing… I’ll get that soon

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 7808838 to c5fedc2 Compare December 2, 2024 19:08
@RalfJung
Copy link
Member

RalfJung commented Dec 2, 2024

r=me when CI is green

@tgross35
Copy link
Contributor Author

tgross35 commented Dec 2, 2024

@bors r=RalfJung,dtolnay

@bors
Copy link
Contributor

bors commented Dec 2, 2024

📌 Commit c5fedc2 has been approved by RalfJung,dtolnay

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 2, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 3, 2024
…llaumeGomez

Rollup of 10 pull requests

Successful merges:

 - rust-lang#131713 (Stabilize `const_maybe_uninit_write`)
 - rust-lang#133535 (show forbidden_lint_groups in future-compat reports)
 - rust-lang#133610 (Move `Const::{from_anon_const,try_from_lit}` to hir_ty_lowering)
 - rust-lang#133701 (Use c"lit" for CStrings without unwrap)
 - rust-lang#133704 (fix ICE when promoted has layout size overflow)
 - rust-lang#133705 (add "profiler" and "optimized-compiler-builtins" option coverage for ci-rustc)
 - rust-lang#133710 (Reducing `target_feature` check-cfg merge conflicts)
 - rust-lang#133732 (Fix `-Zdump-mir-dataflow`)
 - rust-lang#133746 (Change `AttrArgs::Eq` to a struct variant)
 - rust-lang#133763 (Fix `f16::midpoint` const feature gate)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e56e685 into rust-lang:master Dec 3, 2024
6 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 3, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 3, 2024
Rollup merge of rust-lang#131713 - tgross35:stabilize-const_maybe_uninit_write, r=RalfJung,dtolnay

Stabilize `const_maybe_uninit_write`

Mark the following API const stable:

```rust
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`](rust-lang#86722), both of which have recently been stabilized.

Closes: <rust-lang#63567>
@tgross35 tgross35 deleted the stabilize-const_maybe_uninit_write branch December 3, 2024 04:13
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. finished-final-comment-period The final comment period is finished for this PR / Issue. needs-fcp This change is insta-stable, so needs a completed FCP to proceed. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. to-announce Announce this issue on triage meeting
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