-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Trigger modulo_one lint also on -1. #6360
Conversation
r? @llogiq (rust_highfive has picked a reviewer for you, use r? to override) |
Question about tests with static constants: Is there a good reason why the lint should not be triggered by those or is this a bug? |
I don't know the reason. At least filing an issue sounds like a good idea. |
In general, there seems to be quite some inconsistency with constant/literal testing in clippy. For example, the integer_arithmetic lint also tests for literals but does not do constant folding at all. I will suggest consolidating these to rely on a single constant-comparison function similar to / replacing the is_integer_const function. |
This fails the dogfood test. There's a function in misc.rs with 110 lines. We should probably factor some of the lines out into another function. |
I have created a |
☔ The latest upstream changes (presumably #6389) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
Thank you! @bors r+ |
📌 Commit b822632 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Fixes #6321.
changelog: trigger
modulo_one
lint also on-1