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 FP for same_item_push #5908

Merged
merged 2 commits into from
Aug 17, 2020
Merged

Conversation

giraffate
Copy link
Contributor

@giraffate giraffate commented Aug 14, 2020

Fixes #5902

changelog: Fix FP for same_item_push where the pushed variable is mutated.

Don't emit a lint when `pushed_item` was declared as mutable variable.
@rust-highfive
Copy link

r? @flip1995

(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 Aug 14, 2020
Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

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

Only a code style improvement:

clippy_lints/src/loops.rs Outdated Show resolved Hide resolved
@flip1995 flip1995 added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Aug 16, 2020
@flip1995
Copy link
Member

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Aug 17, 2020

📌 Commit 99ba290 has been approved by flip1995

@bors
Copy link
Contributor

bors commented Aug 17, 2020

⌛ Testing commit 99ba290 with merge 9360ca6...

@bors
Copy link
Contributor

bors commented Aug 17, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 9360ca6 to master...

@bors bors merged commit 9360ca6 into rust-lang:master Aug 17, 2020
@Herschel
Copy link
Contributor

Thank you!

@giraffate giraffate deleted the fix_fp_for_same_item_push branch August 18, 2020 05:16
bors added a commit that referenced this pull request Oct 9, 2020
Add changelog for 1.48 beta

[Rendered](https://github.com/ebroto/rust-clippy/blob/changelog_1_48/CHANGELOG.md)

I've not added the PRs fixing `same_item_push` because those were backported, namely:
* [#5908](#5908)
* [#5997](#5997)
* [#6016](#6016)

The following PR was reverted, so I've ignored it too:
* [#5984](#5984)

~~Also, I took the liberty of adding a "Thanks" section, naming all the contributors to this release. I think they deserve visibility in the changelog. Please tell me if we want to add this or maybe it's redundant given we link to the PRs?~~

changelog: none

r? `@flip1995`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

same_item_push lint can trigger when the pushed value is not constant.
5 participants