Skip to content

Conversation

ada4a
Copy link
Contributor

@ada4a ada4a commented Oct 13, 2025

Fixes #15841

changelog: [match_like_matches_macro]: FP with guards containing if let

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 13, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 13, 2025

r? @Alexendoo

rustbot has assigned @Alexendoo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@ada4a
Copy link
Contributor Author

ada4a commented Oct 13, 2025

Depends on #15854, so @rustbot blocked

@rustbot rustbot added S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Oct 13, 2025
@ada4a ada4a changed the title fix(match_like_matches_macro): FP on guards containing if let fix(match_like_matches_macro): FP with guards containing if let Oct 13, 2025
Copy link

github-actions bot commented Oct 13, 2025

Lintcheck changes for 7b83f42

Lint Added Removed Changed
clippy::match_like_matches_macro 0 0 58

This comment will be updated if you push new changes

@ada4a ada4a force-pushed the 15841-match_like_matches branch from 08fd51e to 71c6ad5 Compare October 16, 2025 19:58
@ada4a
Copy link
Contributor Author

ada4a commented Oct 16, 2025

PR merged, so @rustbot ready

@rustbot
Copy link
Collaborator

rustbot commented Oct 16, 2025

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.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work labels Oct 16, 2025
|diag| {
diag.span_suggestion_verbose(
e.span,
"try",
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done:)

@ada4a ada4a force-pushed the 15841-match_like_matches branch from 71c6ad5 to 6197d61 Compare October 20, 2025 14:19
@ada4a ada4a force-pushed the 15841-match_like_matches branch from 6197d61 to 7b83f42 Compare October 20, 2025 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

match-like-matches-macro does not like if_let_guards

3 participants