-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Limit the `[
identity_op]
` lint to integral operands.
#8183
Conversation
If operands are being applied to non-integers, then the lint is likely wrong.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @camsteffen (or someone else) soon. Please see the contribution instructions for more information. |
Do you have an example false positive that this fixes? |
Ah yes. good_lp overloads the shift operators to construct bounds in an ILP. See, for example this overload. I encountered the false positive here. |
I see. Can you add a test for that? Also I think you should use |
Good suggestions. First commit avoids ignoring refs. Second commit actually catches |
Thanks! @bors r+ |
📌 Commit ee6d5c5 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
changelog: limit
[`identity_op`]
to integral operandsIn the
[`identity_op`]
lint, if the operands are non-integers, then the lint is likelywrong.