1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#![allow(dead_code)] struct Foo; impl PartialEq for Foo { fn eq(&self, _: &Foo) -> bool { true } fn ne(&self, _: &Foo) -> bool { false } } struct Bar; impl PartialEq for Bar { fn eq(&self, _: &Bar) -> bool { true } #[allow(clippy::partialeq_ne_impl)] fn ne(&self, _: &Bar) -> bool { false } } fn main() {}