Skip to content

Fix FP for same_item_push#5908

Merged
bors merged 2 commits into
rust-lang:masterfrom
giraffate:fix_fp_for_same_item_push
Aug 17, 2020
Merged

Fix FP for same_item_push#5908
bors merged 2 commits into
rust-lang:masterfrom
giraffate:fix_fp_for_same_item_push

Conversation

@giraffate

@giraffate giraffate commented Aug 14, 2020

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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

@flip1995 flip1995 left a comment

Copy link
Copy Markdown
Member

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:

Comment thread clippy_lints/src/loops.rs Outdated
@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
Copy Markdown
Member

@bors r+

Thanks!

@bors

bors commented Aug 17, 2020

Copy link
Copy Markdown
Contributor

📌 Commit 99ba290 has been approved by flip1995

@bors

bors commented Aug 17, 2020

Copy link
Copy Markdown
Contributor

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

@bors

bors commented Aug 17, 2020

Copy link
Copy Markdown
Contributor

☀️ 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
Copy Markdown
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