-
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
Improvement for equatable_if_let
#9368
Conversation
r? @flip1995 (rust-highfive has picked a reviewer for you, use r? to override) |
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.
Thanks for the PR! This looks good to me.
I'll wait for @flip1995's review if there is any concern with merging this. Particularly, I'm not entirely sure if there's any scenario where we don't want to suggest matches!
.
Just one comment, though, @nahuakang can you help to write the |
@flip1995 Btw when you have time please take a look here :) |
Actually @nahuakang, I found a discussion for this very issue #7777 - and it's unresolved yet. Apologies for just finding this out after you made this PR 😟 |
@dswij No problem :) Thanks for finding it out. So what's the status for either PR? Should I close mine in favor of the other or adjust something? |
Seems like the ongoing discussion is not for the I will try to bring this up in Zulip. |
The discussion in the other PR is not really affected by this change, so I'll merge it like this. Wow, I'm really behind on reviews (this is already from 2 months ago). Sorry about that. @bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
fixes #9221
This PR makes sure that enums or structs not implementing
PartialEq
trait but still using theif let
patterns can be linted to be rewritten withmatches!
.If you added a new lint, here's a checklist for things that will be
checked during review or continuous integration.
.stderr
file)cargo test
passes locallycargo dev update_lints
cargo dev fmt
changelog: Improve [
equatable_if_let
] with additionalmatches!
suggestions.