Actually get the correct ParamEnv in derive_partial_eq_without_eq
This commit is contained in:
parent
a0821fbd75
commit
648dbebfb1
3 changed files with 66 additions and 46 deletions
|
|
@ -52,7 +52,7 @@ impl PartialEq for ManualPartialEqImpl {
|
|||
}
|
||||
|
||||
// Generic fields should be properly checked for Eq-ness
|
||||
#[derive(PartialEq)]
|
||||
#[derive(PartialEq, Eq)]
|
||||
pub struct GenericNotEq<T: Eq, U: PartialEq> {
|
||||
foo: T,
|
||||
bar: U,
|
||||
|
|
@ -95,7 +95,7 @@ pub enum EnumNotEq {
|
|||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
pub struct RustFixWithOtherDerives;
|
||||
|
||||
#[derive(PartialEq)]
|
||||
#[derive(PartialEq, Eq)]
|
||||
pub struct Generic<T>(T);
|
||||
|
||||
#[derive(PartialEq, Eq)]
|
||||
|
|
|
|||
|
|
@ -6,6 +6,12 @@ LL | #[derive(Debug, PartialEq)]
|
|||
|
|
||||
= note: `-D clippy::derive-partial-eq-without-eq` implied by `-D warnings`
|
||||
|
||||
error: you are deriving `PartialEq` and can implement `Eq`
|
||||
--> $DIR/derive_partial_eq_without_eq.rs:55:10
|
||||
|
|
||||
LL | #[derive(PartialEq)]
|
||||
| ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
|
||||
|
||||
error: you are deriving `PartialEq` and can implement `Eq`
|
||||
--> $DIR/derive_partial_eq_without_eq.rs:61:10
|
||||
|
|
||||
|
|
@ -42,6 +48,12 @@ error: you are deriving `PartialEq` and can implement `Eq`
|
|||
LL | #[derive(Debug, PartialEq, Clone)]
|
||||
| ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
|
||||
|
||||
error: you are deriving `PartialEq` and can implement `Eq`
|
||||
--> $DIR/derive_partial_eq_without_eq.rs:98:10
|
||||
|
|
||||
LL | #[derive(PartialEq)]
|
||||
| ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
|
||||
|
||||
error: you are deriving `PartialEq` and can implement `Eq`
|
||||
--> $DIR/derive_partial_eq_without_eq.rs:105:14
|
||||
|
|
||||
|
|
@ -54,5 +66,5 @@ error: you are deriving `PartialEq` and can implement `Eq`
|
|||
LL | #[derive(PartialEq)]
|
||||
| ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
error: aborting due to 11 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue