Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive for derive_hash_xor_eq #4658

Closed
c410-f3r opened this issue Oct 11, 2019 · 0 comments · Fixed by #4766
Closed

False positive for derive_hash_xor_eq #4658

c410-f3r opened this issue Oct 11, 2019 · 0 comments · Fixed by #4766
Assignees
Labels
C-bug Category: Clippy is not doing the correct thing

Comments

@c410-f3r
Copy link
Contributor

c410-f3r commented Oct 11, 2019

derive_hash_xor_eq is triggered for custom traits that are named Hash.

Bad

#[derive(PartialEq)]
struct Foo;

trait Hash {}

impl Hash for Foo {}

Ok

#[derive(PartialEq)]
struct Foo;

trait Hash {}

impl self::Hash for Foo {}
@flip1995 flip1995 added the C-bug Category: Clippy is not doing the correct thing label Oct 14, 2019
@phansch phansch self-assigned this Oct 27, 2019
flip1995 added a commit to flip1995/rust-clippy that referenced this issue Nov 23, 2019
…, r=flip1995

Fix false positive in derive_hash_xor_eq

This fixes a false positive in derive_hash_xor_eq where the lint was
triggering on user-defined traits called `Hash`.

changelog: Fix false positive in `derive_hash_xor_eq`

Fixes rust-lang#4658
@bors bors closed this as completed in 93d84d7 Nov 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants