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

make never_loop applicability more flexible #14203

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

lapla-cogito
Copy link
Contributor

@lapla-cogito lapla-cogito commented Feb 12, 2025

The applicability of never_loop is currently set to Unspecified, but if the loop block does not contain break or continue, it can be MachineApplicable.

changelog: [never_loop]: the applicability is now MachineApplicable when the loop block contains neither break nor continue

@rustbot
Copy link
Collaborator

rustbot commented Feb 12, 2025

r? @y21

rustbot has assigned @y21.
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 the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 12, 2025
@samueltardieu
Copy link
Contributor

You should create a tests/ui/never_loop_fixable.rs to test the fixed version, which would not include //@no-rustfix (which never_loop.rs includes).

@lapla-cogito
Copy link
Contributor Author

Thanks, I've ported the test for this patch to a new file.

@lapla-cogito
Copy link
Contributor Author

Rebased to address the recent changes in error annotation.

@lapla-cogito lapla-cogito force-pushed the never_loop_app branch 5 times, most recently from 6082c1b to a5eec3b Compare February 21, 2025 19:35
Copy link
Member

@y21 y21 left a comment

Choose a reason for hiding this comment

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

LGTM, thank you

@y21 y21 added this pull request to the merge queue Mar 20, 2025
Merged via the queue into rust-lang:master with commit f2feb0f Mar 20, 2025
11 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants