diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/derive_partial_eq_without_eq.fixed | 4 | ||||
| -rw-r--r-- | tests/ui/derive_partial_eq_without_eq.stderr | 14 |
2 files changed, 15 insertions, 3 deletions
diff --git a/tests/ui/derive_partial_eq_without_eq.fixed b/tests/ui/derive_partial_eq_without_eq.fixed index 25e7050d08e..bbbe467590f 100644 --- a/tests/ui/derive_partial_eq_without_eq.fixed +++ b/tests/ui/derive_partial_eq_without_eq.fixed @@ -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)] diff --git a/tests/ui/derive_partial_eq_without_eq.stderr b/tests/ui/derive_partial_eq_without_eq.stderr index b762efc4744..794c5dab844 100644 --- a/tests/ui/derive_partial_eq_without_eq.stderr +++ b/tests/ui/derive_partial_eq_without_eq.stderr @@ -7,6 +7,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 | LL | #[derive(PartialEq)] @@ -43,6 +49,12 @@ 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 | LL | #[derive(PartialEq)] @@ -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 |
