Skip to content

Conversation

ojeda
Copy link
Member

@ojeda ojeda commented Feb 26, 2021

A couple clippy-related commits (see the commit messages)

This covers the default clippy warnings.

Signed-off-by: Miguel Ojeda <[email protected]>
It turns out that is only a workaround intended for `cargo`.
The official instructions since PR [1] describe the usage of
`clippy-driver`, and they intentionally only cover replacing
`rustc` with `clippy-driver` rather than wrapping it, as
discussed in that PR.

[1] rust-lang/rust-clippy#6782

Signed-off-by: Miguel Ojeda <[email protected]>
@ojeda
Copy link
Member Author

ojeda commented Feb 26, 2021

Before I forget: I am not sure whether to implement Default or disable the lint. My gut feeling was that the trait is intended mainly for POD-like types, even for things like String, but then I saw the standard library actually implements it even for things like RwLock too, so I guess it is fine?

Copy link
Member

@alex alex left a comment

Choose a reason for hiding this comment

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

I also feel weird about the Default implementations -- neither of those types seems like places that really benefit from it. But also I don't feel super strongly and the rest of the changes look good.

@ojeda
Copy link
Member Author

ojeda commented Feb 26, 2021

Thanks! I guess since we both feel it is a bit weird we can take it out and disable the lint globally, since I bet we will hit this for many things... Anyway, not a big deal at this point.

@ojeda ojeda merged commit 0440a1c into rust Feb 26, 2021
@ojeda ojeda deleted the rust-clean-clippy branch February 26, 2021 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants