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 core::str::from_utf8_mut as const #136668

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

WaffleLapkin
Copy link
Member

cc #91006 (tracking issue)

r? libs-api

@WaffleLapkin WaffleLapkin 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, so needs a completed FCP to proceed. labels Feb 7, 2025
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 7, 2025
@WaffleLapkin WaffleLapkin changed the title Stabilize core::str::from_utf8_mut Stabilize core::str::from_utf8_mut as const Feb 7, 2025
@WaffleLapkin
Copy link
Member Author

For context this stabilizes the following function in core::str as a const:

// core::str

pub const fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error>;

Note that similar core::str::from_utf8 is already stable as const -- at the time of its stabilization &mut wasn't yet stable in const, so we couldn't stabilize from_utf8_mut.

@rust-log-analyzer

This comment has been minimized.

@m-ou-se
Copy link
Member

m-ou-se commented Feb 11, 2025

@rfcbot merge

@rfcbot
Copy link

rfcbot commented Feb 11, 2025

Team member @m-ou-se 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. 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 Feb 11, 2025
@rfcbot
Copy link

rfcbot commented Feb 11, 2025

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

@bors
Copy link
Contributor

bors commented Feb 17, 2025

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

@Amanieu Amanieu removed the S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). label Feb 18, 2025
@tgross35
Copy link
Contributor

#137277 should land before this, in which case this can probably be updated to include the inherent str::from_utf8_mut with a 👍 from someone on libs-api.

@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 Feb 21, 2025
@rfcbot
Copy link

rfcbot commented Feb 21, 2025

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.

@WaffleLapkin
Copy link
Member Author

I've rebased on master; this now stabilizes the inherited function as const as well, that's obviously fine since it was stabilized and it's equivalent to the free version. This is ready for review.

@Amanieu
Copy link
Member

Amanieu commented Feb 24, 2025

@bors r+

@bors
Copy link
Contributor

bors commented Feb 24, 2025

📌 Commit bf3ed81 has been approved by Amanieu

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-review Status: Awaiting review from the assignee but also interested parties. labels Feb 24, 2025
@RalfJung
Copy link
Member

Cc @rust-lang/wg-const-eval

@compiler-errors
Copy link
Member

@bors rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 25, 2025
Rollup of 8 pull requests

Successful merges:

 - rust-lang#134655 (Stabilize `hash_extract_if`)
 - rust-lang#135933 (Explain how Vec::with_capacity is faithful)
 - rust-lang#136668 (Stabilize `core::str::from_utf8_mut` as `const`)
 - rust-lang#136775 (Update `String::from_raw_parts` safety requirements)
 - rust-lang#137109 (stabilize extract_if)
 - rust-lang#137349 (Implement `read_buf` for zkVM stdin)
 - rust-lang#137493 (configure.py: don't instruct user to run nonexistent program)
 - rust-lang#137516 (remove some unnecessary rustc_const_unstable)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit fe2876f into rust-lang:master Feb 25, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Feb 25, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 25, 2025
Rollup merge of rust-lang#136668 - WaffleLapkin:from_utf8_mut, r=Amanieu

Stabilize `core::str::from_utf8_mut` as `const`

cc rust-lang#91006 (tracking issue)

r? libs-api
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.