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 in indirect needless_collect when used multiple times #6313

Merged
merged 1 commit into from
Nov 23, 2020

Conversation

giraffate
Copy link
Contributor

Fix #5991
Fix #6297

changelog: Fix FP in indirect needless_collect when used multiple times

@rust-highfive
Copy link

r? @ebroto

(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 Nov 9, 2020
@camsteffen
Copy link
Contributor

It would be nice if the lint still fired when all usages of the collected item are len or is_empty.

@bors
Copy link
Collaborator

bors commented Nov 12, 2020

☔ The latest upstream changes (presumably #6325) made this pull request unmergeable. Please resolve the merge conflicts.

Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

Copy link
Member

@ebroto ebroto left a comment

Choose a reason for hiding this comment

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

It would be nice if the lint still fired when all usages of the collected item are len or is_empty.

I think we can leave that for a future improvement. For now at least we get rid of the false positive.

@ebroto
Copy link
Member

ebroto commented Nov 23, 2020

@bors r+

Thanks!

@bors
Copy link
Collaborator

bors commented Nov 23, 2020

📌 Commit 8f89108 has been approved by ebroto

@ebroto ebroto removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Nov 23, 2020
@ebroto
Copy link
Member

ebroto commented Nov 23, 2020

BTW sorry for the long delay in reviewing, I've been deprived of free time for a while

@bors
Copy link
Collaborator

bors commented Nov 23, 2020

⌛ Testing commit 8f89108 with merge 295fe28...

@bors
Copy link
Collaborator

bors commented Nov 23, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: ebroto
Pushing 295fe28 to master...

@bors bors merged commit 295fe28 into rust-lang:master Nov 23, 2020
@giraffate giraffate deleted the fix_fp_needless_collect branch November 23, 2020 23:30
@giraffate
Copy link
Contributor Author

No worries. Thanks for your review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False-positive of needless_collect needless_collect - false positive?
5 participants