Skip to content

Conversation

bluthej
Copy link
Contributor

@bluthej bluthej commented Apr 9, 2023

Fixes #10572: both the original intent of the issue (extending clear_with_drain) and the false negative for collection_is_never_read I found in the process are fixed by this PR.

changelog: [clear_with_drain]: extend to 5 other types of containers. [collection_is_never_read]: fix false negative for Strings.

bluthej added 6 commits April 7, 2023 16:07
`String` is currently not a diagnostic item so it needs special
treatment
`String` is not a diagnostic item and was thus not picked up by
`is_type_diagnostic_item`, leading to a false negative for
`collection_is_never_read`
The specific type `Vec` is replaced with the generic term 'container'
@rustbot
Copy link
Collaborator

rustbot commented Apr 9, 2023

r? @Manishearth

(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 Apr 9, 2023
Copy link
Contributor

@schubart schubart left a comment

Choose a reason for hiding this comment

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

The change to collection_is_never_read looks good to me.

@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Apr 11, 2023

📌 Commit d8f0a96 has been approved by Manishearth

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Apr 11, 2023

⌛ Testing commit d8f0a96 with merge 5ec2e19...

@bors
Copy link
Contributor

bors commented Apr 11, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Manishearth
Pushing 5ec2e19 to master...

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.

Want to extend clear_with_drain to other types of containers

5 participants