Open
Description
Summary
error: you are deriving `PartialEq` and can implement `Eq`
--> my/project/folder/mod.rs:90:48
|
90 | #[derive(third_party::Trait, Debug)]
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq
= note: this error originates in the derive macro `third_party::Trait` (in Nightly builds, run with -Z macro-backtrace for more info)
derive_partial_eq_without_eq
seems to trigger for proc macro derives from third party crates which adds PartialEq
but not Eq
, which while a user can theoretically add an implementation for / derive Eq
as well, it could cause breakage when the crate author updates and adds the missing implementation / derive as well
Reproducer
I tried this code:
#[derive(third_party::Trait, Debug)]
I expected to see this happen: No lint error
Instead, this happened: A lint error for derive_partial_eq_without_eq
Version
rustc 1.63.0 (4b91a6ea7 2022-08-08)
binary: rustc
commit-hash: 4b91a6ea7258a947e59c6522cd5898e7c0a6a88f
commit-date: 2022-08-08
host: aarch64-apple-darwin
release: 1.63.0
LLVM version: 14.0.5
Additional Labels
No response