File tree Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,8 @@ pub enum MissingEqNonExhaustive3 {
153153 Bar,
154154}
155155
156- mod issue_9413 {
156+ mod struct_gen {
157+ // issue 9413
157158 pub trait Group {
158159 type Element: Eq + PartialEq;
159160 }
@@ -168,6 +169,14 @@ mod issue_9413 {
168169
169170 #[derive(PartialEq, Eq)]
170171 pub struct Bar<C: Suite>(i32, <C::Group as Group>::Element);
172+
173+ // issue 9319
174+ #[derive(PartialEq, Eq)]
175+ //~^ ERROR: you are deriving `PartialEq` and can implement `Eq`
176+ pub struct Oof<T: Fn()>(T);
177+
178+ #[derive(PartialEq, Eq)]
179+ pub struct Rab<T: Fn()>(T);
171180}
172181
173182fn main() {}
Original file line number Diff line number Diff line change @@ -153,7 +153,8 @@ pub enum MissingEqNonExhaustive3 {
153153 Bar ,
154154}
155155
156- mod issue_9413 {
156+ mod struct_gen {
157+ // issue 9413
157158 pub trait Group {
158159 type Element : Eq + PartialEq ;
159160 }
@@ -168,6 +169,14 @@ mod issue_9413 {
168169
169170 #[ derive( PartialEq , Eq ) ]
170171 pub struct Bar < C : Suite > ( i32 , <C :: Group as Group >:: Element ) ;
172+
173+ // issue 9319
174+ #[ derive( PartialEq ) ]
175+ //~^ ERROR: you are deriving `PartialEq` and can implement `Eq`
176+ pub struct Oof < T : Fn ( ) > ( T ) ;
177+
178+ #[ derive( PartialEq , Eq ) ]
179+ pub struct Rab < T : Fn ( ) > ( T ) ;
171180}
172181
173182fn main ( ) { }
Original file line number Diff line number Diff line change @@ -68,10 +68,16 @@ LL | #[derive(PartialEq)]
6868 | ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
6969
7070error: you are deriving `PartialEq` and can implement `Eq`
71- --> tests/ui/derive_partial_eq_without_eq.rs:165 :14
71+ --> tests/ui/derive_partial_eq_without_eq.rs:166 :14
7272 |
7373LL | #[derive(PartialEq)]
7474 | ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
7575
76- error: aborting due to 12 previous errors
76+ error: you are deriving `PartialEq` and can implement `Eq`
77+ --> tests/ui/derive_partial_eq_without_eq.rs:174:14
78+ |
79+ LL | #[derive(PartialEq)]
80+ | ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
81+
82+ error: aborting due to 13 previous errors
7783
You can’t perform that action at this time.
0 commit comments