-
Notifications
You must be signed in to change notification settings - Fork 14k
Stabilize char_max_len
#145610
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
base: main
Are you sure you want to change the base?
Stabilize char_max_len
#145610
Conversation
|
Nominating for libs-api discussion since I'm not sure we want to stabilize both the associated constants and the free constants in the |
Would removing the freestanding constants be feasible? All constants in primitive type "modules" seem to be deprecated themselves anyway, we shouldn't add a constant just for it to be deprecated. |
|
The main reason to keep the freestanding constants is that we don't currently support importing associated constants. You would always have to reference them with the char:: prefix. |
|
Given that we've deprecated a lot of the non-associated constants, I think we should only be stabilizing the associated constants. @rfcbot merge |
|
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. |
|
☔ The latest upstream changes (presumably #145916) made this pull request unmergeable. Please resolve the merge conflicts. |
30f629b to
cf69bf3
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
cf69bf3 to
23ea5dc
Compare
|
☔ The latest upstream changes (presumably #146494) made this pull request unmergeable. Please resolve the merge conflicts. |
23ea5dc to
5963ce3
Compare
This comment has been minimized.
This comment has been minimized.
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
|
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. |
|
@rustbot label -S-waiting-on-fcp -S-waiting-on-review -needs-fcp |
|
☔ The latest upstream changes (presumably #148573) made this pull request unmergeable. Please resolve the merge conflicts. |
5963ce3 to
fd11176
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@rustbot ready |
library/core/src/char/mod.rs
Outdated
| /// The maximum number of bytes required to [encode](char::encode_utf8) a `char` to | ||
| /// UTF-8 encoding. | ||
| #[unstable(feature = "char_max_len", issue = "121714")] | ||
| #[stable(feature = "char_max_len", since = "CURRENT_RUSTC_VERSION")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the FCP we decided to only stabilize the associated constants, not the constants in the core::char module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough.
Should I just delete them or keep them as perma-unstable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say just keep them as-is as IIRC there hasn't been a formal decision to remove them yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. They will remain under char_max_len. The newly stabilized constants in impl char are now gated behind the stable char_max_len_assoc feature. This is similar to what I did during the partial stabilization of io_error_more.
fd11176 to
9ed9535
Compare
This comment has been minimized.
This comment has been minimized.
9ed9535 to
0e882fc
Compare
Tracking issue: #121714
r? t-libs-api
@rustbot label +needs-fcp -T-libs +T-libs-api
Closes #121714