Open jplatte opened 2 years ago
Additionally, the lint also still fires for types that are public within their module, but not part of the crate API (I noticed this in a proc-macro crate and a binary crate).
@jplatte experienced this error in my builds today. I just ignored the linting error to fix my builds
#![allow(
...
clippy::derive_partial_eq_without_eq
)]
This also potentially warns on type in binary crates, where the type will not be used elsewhere. https://github.com/rust-lang/rust/issues/74970 may help with the fix, but I think the number of false positives now is worth a quicker fix.
Summary
The
derive_partial_eq_without_eq
lint triggers on#[cfg_attr(test, derive(PartialEq))]
, I think it shouldn't.Lint Name
derive_partial_eq_without_eq
Reproducer
I tried this code:
I saw this happen with
cargo clippy --tests
:I expected to see this happen: no warnings
Version
Additional Labels
No response