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

Fix almost_swapped false positive (let mut a = b; a = a) #10499

Merged
merged 1 commit into from Mar 14, 2023

Conversation

blyxyas
Copy link
Member

@blyxyas blyxyas commented Mar 13, 2023

Fixes 2 in #10421
changelog: [almost_swapped]: Fix false positive when a variable is changed to itself. (a = a)

@rustbot
Copy link
Collaborator

rustbot commented Mar 13, 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 Mar 13, 2023
Copy link
Contributor

@giraffate giraffate left a comment

Choose a reason for hiding this comment

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

Thanks!

It seems to be only resolve 2 in #10421 (comment). So I updated notes not to close #10421.

@giraffate
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 14, 2023

📌 Commit 6631480 has been approved by giraffate

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Mar 14, 2023

⌛ Testing commit 6631480 with merge c465bf7...

@bors
Copy link
Collaborator

bors commented Mar 14, 2023

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

1 similar comment
@bors
Copy link
Collaborator

bors commented Mar 14, 2023

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

@bors bors merged commit c465bf7 into rust-lang:master Mar 14, 2023
4 checks passed
@blyxyas
Copy link
Member Author

blyxyas commented Mar 14, 2023

Yeah I only tackled 2 because I didn't know if it should lint on macros or not.
Anyway, looking again at the problem, 3 should also fix 1, right? The fix to the third point (ignoring macros) should remove the necessity to correct an error message that happens in macros.

Is this true?

@Alexendoo
Copy link
Member

Yeah it would, and yeah we don't want to be linting macros

bors added a commit that referenced this pull request Mar 17, 2023
fix `almost_swapped`: Ignore external macros

Fixes #10421 ; Related to #10499 (Fixing points *1* and *3* from #10421)
changelog: [`almost_swapped`]: Add a check to ignore external macros
@Garandor Garandor mentioned this pull request Apr 25, 2023
12 tasks
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

5 participants