Closed
Description
The following Rust code (playground):
struct Foo();
impl PartialEq for Foo {
fn eq(&self, _: &Self) -> bool {
true
}
#[cfg_attr(feature = "cargo-clippy", allow(partialeq_ne_impl))]
fn ne(&self, _: &Self) -> bool {
false
}
}
fn main() {}
produces the partialeq_ne_lint
:
warning: re-implementing `PartialEq::ne` is unnecessary
--> src/main.rs:8:5
|
8 | / fn ne(&self, _: &Self) -> bool {
9 | | false
10 | | }
| |_____^
|
= note: #[warn(partialeq_ne_impl)] on by default
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.211/index.html#partialeq_ne_impl
but it shouldn't produce it because it is allow
ed.