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

[manual_retain]: Fix duplicate diagnostics #12452

Merged
merged 1 commit into from Mar 11, 2024

Conversation

CBSpeir
Copy link
Contributor

@CBSpeir CBSpeir commented Mar 10, 2024

Relates to: #12379

The first lint guard executed in LateLintPass::check_expr was testing if the parent was of type ExprKind::Assign. This meant the lint emitted on both sides of the assignment operator when check_expr is called on either Expr. The guard in the fix only lints once when the Expr is of kind Assign.

changelog: Fix duplicate lint diagnostic emission from [manual_retain]

@rustbot
Copy link
Collaborator

rustbot commented Mar 10, 2024

r? @blyxyas

rustbot has assigned @blyxyas.
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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 10, 2024
@CBSpeir CBSpeir changed the title Fix duplicate lint emission from [manual_retain] [manual_retain]: Fix duplicate diagnostics Mar 10, 2024
Copy link
Member

@blyxyas blyxyas 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! ❤️

@blyxyas
Copy link
Member

blyxyas commented Mar 11, 2024

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 11, 2024

📌 Commit ed6e629 has been approved by blyxyas

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Mar 11, 2024

⌛ Testing commit ed6e629 with merge e22ca03...

@bors
Copy link
Collaborator

bors commented Mar 11, 2024

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

@bors bors merged commit e22ca03 into rust-lang:master Mar 11, 2024
5 checks passed
@CBSpeir CBSpeir deleted the dedup-manual-retain branch March 13, 2024 01:47
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