Skip to content

Conversation

thaliaarchi
Copy link
Contributor

@thaliaarchi thaliaarchi commented Jul 17, 2025

The corresponding new_uninit and new_uninit_slice functions were stabilized in #129401, but the zeroed counterparts were left for later out of a desire to stabilize only the minimal set. These functions are straightforward mirrors of the uninit functions and well-established. Since no blockers or design questions have surfaced in the past year, I think it's time to stabilize them.

Tracking issue: #129396

@rustbot
Copy link
Collaborator

rustbot commented Jul 17, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Jul 17, 2025
@rust-log-analyzer

This comment has been minimized.

@thaliaarchi thaliaarchi force-pushed the stabilize-new-zeroed branch 2 times, most recently from 36a935b to a84ecd9 Compare July 17, 2025 23:07
@thaliaarchi
Copy link
Contributor Author

thaliaarchi commented Jul 17, 2025

@jieyouxu Are the bootstrap gates for rustc_index correct with the redesigned bootstrap sequence? It needs to be compilable in four ways: with feature = "nightly" by stage0, stage1, or from crates.io, or without feature = "nightly" from crates.io.

@rust-log-analyzer

This comment has been minimized.

@thaliaarchi thaliaarchi force-pushed the stabilize-new-zeroed branch 2 times, most recently from f9df154 to 081ce42 Compare July 17, 2025 23:37
@@ -1,9 +1,9 @@
// tidy-alphabetical-start
#![cfg_attr(all(feature = "nightly", bootstrap), feature(new_zeroed_alloc))]
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem right to me. I'd expect just cfg(bootstrap) here -- presumably, once this is released/used via nightly feature gate this PR would have already landed and so the feature isn't needed.

/// # Ok::<(), std::alloc::AllocError>(())
/// ```
#[unstable(feature = "allocator_api", issue = "32838")]
// #[unstable(feature = "new_uninit", issue = "63291")]
Copy link
Member

Choose a reason for hiding this comment

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

Hm, are these just stale comments? I'm a bit confused why we're deleting these in this PR...

Copy link
Contributor Author

@thaliaarchi thaliaarchi Jul 19, 2025

Choose a reason for hiding this comment

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

These comments weren't updated when new_zeroed_alloc was split out of new_uninit, so half of them (e.g., try_new_zeroed) should be removed by this stabilization. Since the other half are already stable, but are closely related, it seems reasonable to fix them here.

@rustbot rustbot 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-review Status: Awaiting review from the assignee but also interested parties. labels Jul 19, 2025
@Mark-Simulacrum Mark-Simulacrum added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 19, 2025
@thaliaarchi thaliaarchi force-pushed the stabilize-new-zeroed branch from 081ce42 to 0c18553 Compare July 19, 2025 23:30
@rust-log-analyzer

This comment has been minimized.

@thaliaarchi thaliaarchi force-pushed the stabilize-new-zeroed branch from 0c18553 to 6d1c12a Compare July 19, 2025 23:37
@thaliaarchi

This comment was marked as resolved.

@rust-log-analyzer

This comment has been minimized.

@thaliaarchi thaliaarchi force-pushed the stabilize-new-zeroed branch from 6d1c12a to c82db9b Compare July 19, 2025 23:53
@thaliaarchi thaliaarchi force-pushed the stabilize-new-zeroed branch from c82db9b to 175afd7 Compare July 20, 2025 03:25
@Amanieu
Copy link
Member

Amanieu commented Jul 22, 2025

@rfcbot merge

@rfcbot
Copy link

rfcbot commented Jul 22, 2025

Team member @Amanieu 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 Jul 22, 2025
@Amanieu Amanieu added S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. and removed 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. S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels Jul 22, 2025
@rust-rfcbot rust-rfcbot added the final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. label Sep 1, 2025
@rust-rfcbot
Copy link
Collaborator

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

@rust-rfcbot rust-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 Sep 11, 2025
@rust-rfcbot
Copy link
Collaborator

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.

@thaliaarchi
Copy link
Contributor Author

@Mark-Simulacrum This has now passed FCP and I think I've addressed your review comments. Are we good to go?

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. labels Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
finished-final-comment-period The final comment period is finished for this PR / Issue. needs-fcp This change is insta-stable, or significant enough to need a team 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. to-announce Announce this issue on triage meeting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants