-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Clear with drain #10614
Clear with drain #10614
Conversation
`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'
r? @Manishearth (rustbot has picked a reviewer for you, use r? to override) |
There was a problem hiding this 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.
@bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Fixes #10572: both the original intent of the issue (extending
clear_with_drain
) and the false negative forcollection_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 forString
s.