Skip to content

str: Stabilize round_char_boundary feature #145756

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

okaneco
Copy link
Contributor

@okaneco okaneco commented Aug 22, 2025

Closes #93743
FCP completed #93743 (comment)

@rustbot
Copy link
Collaborator

rustbot commented Aug 22, 2025

r? @scottmcm

rustbot has assigned @scottmcm.
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-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 22, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 22, 2025

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rust-log-analyzer

This comment has been minimized.

@@ -51,7 +51,6 @@
#![feature(negative_impls)]
#![feature(never_type)]
#![feature(ptr_alignment_type)]
#![feature(round_char_boundary)]
Copy link
Member

Choose a reason for hiding this comment

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

Won't you need to cfg_attr(bootstrap, …) the feature in the compiler itself (two instances)?

Copy link
Member

Choose a reason for hiding this comment

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

You'll need to do this in Clippy's clippy_lints crate as well, since it can now be built by the stage0 compiler.

Copy link
Contributor Author

@okaneco okaneco Aug 22, 2025

Choose a reason for hiding this comment

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

Thanks, I haven't stabilized a feature that touched these other parts of the compiler before.

I manually reordered the cfg_attr features because tidy check complained about alphabetic ordering, but it didn't suggest what line to place it. I couldn't find an automatic --fix option either. Running ./x fmt didn't seem to adjust it either but maybe I have the setup configured wrong (I have it set to the library contributing mode, not sure if that changes anything).

Copy link
Member

@samueltardieu samueltardieu Aug 22, 2025

Choose a reason for hiding this comment

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

x fmt doesn't reorder AFAICT, you have to put the inner attributes in order by hand (as you did).

Clippy using stage 0 is new and doesn't care about inner attributes order, what you did (order by feature name) is fine as well there.

@@ -1,4 +1,3 @@
#![feature(round_char_boundary)]
Copy link
Member

Choose a reason for hiding this comment

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

You need to run ./x.py test clippy --bless to update the stderr file with the line number changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in c5c6520

@okaneco okaneco force-pushed the stabilize_char_boundary branch from 214dcea to c5c6520 Compare August 22, 2025 17:26
@rust-log-analyzer

This comment has been minimized.

@okaneco okaneco force-pushed the stabilize_char_boundary branch from c5c6520 to e42c1b1 Compare August 22, 2025 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc 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 str::{floor, ceil}_char_boundary
5 participants