-
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
[erasing_op
] lint ignored when operation Output
type is different from the type of constant 0
#8204
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @xFrednet (or someone else) soon. Please see the contribution instructions for more information. |
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.
Welcome to Clippy 👋. Your changes look good to me, I only have two smaller comments.
I've also looked at the implementation of identity_op
which restricts the lint emissions to only trigger on number types. I think your solution of comparing the types is the better solution. We might want to think about also making this change to the identity_op
implementation 🙃
Implemented based on the suggestion, squashed and rebased on master. |
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.
LGTM
Looks good to me, thank you for the swift response, could you bless the tests one more time and squash it, then it's ready to be merged! 🙃 |
Aye, sir, just noticed the breakage. Fixed. |
Alright, looks good to me, I hope you also had fun while working on this 🙃 @bors r+ |
📌 Commit e8b6b2a has been approved by |
[`erasing_op`] lint ignored when operation `Output` type is different from the type of constant `0` fixes #7210 changelog: [`erasing_op`] lint ignored when operation `Output` type is different from the type of constant `0`
💔 Test failed - checks-action_test |
The changelog label and entry have to be on the same line, it should work now 🙃 @bors retry |
Oh. Thanks. Sure, I enjoyed it. First time I looked below the hood and it was less scary than I thought. I only made a Roslyn check for C# before, that was worse 🤣 |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
That's good to hear, the manageable code base was actually the reason why I started to contribute to Clippy. Rustc and other compiler projects seemed to intimidating xD |
fixes #7210
changelog: [
erasing_op
] lint ignored when operationOutput
type is different from the type of constant0