Actually get the correct ParamEnv in derive_partial_eq_without_eq

This commit is contained in:
Jason Newcomb 2022-06-04 20:21:56 -04:00
parent a0821fbd75
commit 648dbebfb1
3 changed files with 66 additions and 46 deletions

View file

@ -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)]

View file

@ -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