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 {
153
153
Bar,
154
154
}
155
155
156
- mod issue_9413 {
156
+ mod struct_gen {
157
+ // issue 9413
157
158
pub trait Group {
158
159
type Element: Eq + PartialEq;
159
160
}
@@ -168,6 +169,14 @@ mod issue_9413 {
168
169
169
170
#[derive(PartialEq, Eq)]
170
171
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);
171
180
}
172
181
173
182
fn main() {}
Original file line number Diff line number Diff line change @@ -153,7 +153,8 @@ pub enum MissingEqNonExhaustive3 {
153
153
Bar ,
154
154
}
155
155
156
- mod issue_9413 {
156
+ mod struct_gen {
157
+ // issue 9413
157
158
pub trait Group {
158
159
type Element : Eq + PartialEq ;
159
160
}
@@ -168,6 +169,14 @@ mod issue_9413 {
168
169
169
170
#[ derive( PartialEq , Eq ) ]
170
171
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 ) ;
171
180
}
172
181
173
182
fn main ( ) { }
Original file line number Diff line number Diff line change @@ -68,10 +68,16 @@ LL | #[derive(PartialEq)]
68
68
| ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
69
69
70
70
error: 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
72
72
|
73
73
LL | #[derive(PartialEq)]
74
74
| ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
75
75
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
77
83
You can’t perform that action at this time.
0 commit comments