-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix(match_like_matches_macro): FP with guards containing if let
#15876
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
base: master
Are you sure you want to change the base?
Conversation
r? @Alexendoo rustbot has assigned @Alexendoo. Use |
if let
if let
Lintcheck changes for 7b83f42
This comment will be updated if you push new changes |
08fd51e
to
71c6ad5
Compare
PR merged, so @rustbot ready |
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|diag| { | ||
diag.span_suggestion_verbose( | ||
e.span, | ||
"try", |
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.
Since we're issuing a verbose suggestion now we'd want to ditch the short try
message
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.
Is there that much to add to the suggestion though? I think any longer message would need to mention matches!
(e.g. "use matches!
directly"), but that's already a part of the diagnostic message.
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.
A bit of repetition is fine, it's nice to spell out the suggestion when we have the room
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.
Done:)
71c6ad5
to
6197d61
Compare
they are much readable this way imo
6197d61
to
7b83f42
Compare
Fixes #15841
changelog: [
match_like_matches_macro
]: FP with guards containingif let