Skip to content
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

[redundant_guards]: lint if the pattern is on the left side #11522

Merged
merged 1 commit into from Sep 21, 2023

Conversation

y21
Copy link
Member

@y21 y21 commented Sep 17, 2023

A tiny improvement to the redundant_guards lint. There's no associated issue for this, just noticed it while going through the code.
Right now it warns on Some(x) if x == 2 and suggests Some(2), but it didn't do that for Some(x) if 2 == x (i.e. when the local is on the right side and the pattern on the left side).

changelog: [redundant_guards]: also lint if the pattern is on the left side

@rustbot
Copy link
Collaborator

rustbot commented Sep 17, 2023

r? @giraffate

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Sep 17, 2023
@giraffate
Copy link
Contributor

@bors r+

Thanks!

@bors
Copy link
Collaborator

bors commented Sep 20, 2023

📌 Commit 558ae4c has been approved by giraffate

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Sep 20, 2023

⌛ Testing commit 558ae4c with merge c556695...

@bors
Copy link
Collaborator

bors commented Sep 21, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: giraffate
Pushing c556695 to master...

@bors bors merged commit c556695 into rust-lang:master Sep 21, 2023
5 checks passed
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.

None yet

4 participants