rust-lang / rust-lang/rust-clippy

partialeq_ne_impl lint documentation incorrect

Open
#2,893 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

S-needs-discussion
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

The documentation for the partialeq_ne_impl states:

Therefore, there should never be any need to re-implement it.

but this is incorrect since re-implementing PartialEq::ne makes often a lot of sense for performance purposes where it can be implemented more efficiently than just !eq.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked documentation entry for partialeq_ne_impl and inspect how that lint's text is maintained. Update the inaccurate statement about re-implementing PartialEq::ne to reflect the reported performance rationale, then verify the rendered documentation conveys the corrected guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.