-
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
Make comparison_to_empty
work on if let
/let
chains
#11029
Conversation
r? @Jarcho (rustbot has picked a reviewer for you, use r? to override) |
This would work just as well by checking for |
Done, I've kept |
I'm not sure how useful it will end up. An iterator over binary operator chains might be useful, but I'd rather wait for a definite use case before adding it. Generally util functions shouldn't be added without at least a single use case. |
#9665. It requires something like this (if it wants to support let chains), and my prototype implementation uses it. |
If that's the case then it should be added with that PR so it can be reviewed with it's use case. |
☔ The latest upstream changes (presumably #11095) made this pull request unmergeable. Please resolve the merge conflicts. |
ping @Centri3 This is only waiting on a rebase and the removal of the let-chain util. |
Thank you. @bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
This adds
LetChain
toclippy_utils::higher
, other lints may benefit from such a change as well :Dchangelog: Enhancement: [
comparison_to_empty
]: Now lints onif let