rust-lang / rust-lang/rust-clippy
`derive_partial_eq_without_eq` triggers inside binary crates
Open
Nobody has claimed this yet.
C-bug
I-false-positive
L-nursery
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
Summary
I don't think it should.
Lint Name
derive_partial_eq_without_eq
Reproducer
I tried this code:
#[derive(PartialEq)]
pub enum Explore {
Stable,
RecentlyStabilized,
Unstable,
}
in a binary crate: I saw the derive_partial_eq_without_eq being triggered. I expected to not have it trigger.
Version
rustc 1.66.0-nightly (4a1467723 2022-09-23)
binary: rustc
commit-hash: 4a14677239bbd9a3892d165ee24513c1a05820e4
commit-date: 2022-09-23
host: x86_64-unknown-linux-gnu
release: 1.66.0-nightly
LLVM version: 15.0.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the derive_partial_eq_without_eq lint and reproducing the diagnostic with the provided enum in a binary crate. Compare that behavior with the expected binary-crate scope; done when the lint no longer triggers there and the case has regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100