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

lint nested patterns and slice patterns in needless_borrowed_reference #9573

Merged
merged 1 commit into from
Oct 2, 2022

Conversation

Alexendoo
Copy link
Member

Now lints in positions other than top level, e.g. Some(&ref a). Or patterns are excluded as that can cause issues

Slice patterns of refs are now linted, e.g. &[ref a, ref b]. An easy one to walk into as you might expect that to match against a slice you should use &[], then to get around a cannot move out of type [T] error you apply a ref

changelog: [needless_borrowed_reference]: lint nested patterns and slice patterns

@rust-highfive
Copy link

r? @dswij

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 1, 2022
Copy link
Member

@dswij dswij left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for this!

@dswij
Copy link
Member

dswij commented Oct 2, 2022

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 2, 2022

📌 Commit 52a68dc has been approved by dswij

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Oct 2, 2022

⌛ Testing commit 52a68dc with merge 5d837b5...

@bors
Copy link
Collaborator

bors commented Oct 2, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: dswij
Pushing 5d837b5 to master...

@bors bors merged commit 5d837b5 into rust-lang:master Oct 2, 2022
@Alexendoo Alexendoo deleted the needless-borrowed-ref-slice branch October 2, 2022 11:05
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