File tree 2 files changed +64
-0
lines changed
2 files changed +64
-0
lines changed Original file line number Diff line number Diff line change @@ -121,4 +121,36 @@ pub fn _from_mod() -> _hidden::InPubFn {
121
121
#[derive(PartialEq)]
122
122
struct InternalTy;
123
123
124
+ // This is a `non_exhaustive` type so should not warn.
125
+ #[derive(Debug, PartialEq)]
126
+ #[non_exhaustive]
127
+ pub struct MissingEqNonExhaustive {
128
+ foo: u32,
129
+ bar: String,
130
+ }
131
+
132
+ // This is a `non_exhaustive` type so should not warn.
133
+ #[derive(Debug, PartialEq)]
134
+ pub struct MissingEqNonExhaustive1 {
135
+ foo: u32,
136
+ #[non_exhaustive]
137
+ bar: String,
138
+ }
139
+
140
+ // This is a `non_exhaustive` type so should not warn.
141
+ #[derive(Debug, PartialEq)]
142
+ #[non_exhaustive]
143
+ pub enum MissingEqNonExhaustive2 {
144
+ Foo,
145
+ Bar,
146
+ }
147
+
148
+ // This is a `non_exhaustive` type so should not warn.
149
+ #[derive(Debug, PartialEq)]
150
+ pub enum MissingEqNonExhaustive3 {
151
+ Foo,
152
+ #[non_exhaustive]
153
+ Bar,
154
+ }
155
+
124
156
fn main() {}
Original file line number Diff line number Diff line change @@ -121,4 +121,36 @@ pub fn _from_mod() -> _hidden::InPubFn {
121
121
#[ derive( PartialEq ) ]
122
122
struct InternalTy ;
123
123
124
+ // This is a `non_exhaustive` type so should not warn.
125
+ #[ derive( Debug , PartialEq ) ]
126
+ #[ non_exhaustive]
127
+ pub struct MissingEqNonExhaustive {
128
+ foo : u32 ,
129
+ bar : String ,
130
+ }
131
+
132
+ // This is a `non_exhaustive` type so should not warn.
133
+ #[ derive( Debug , PartialEq ) ]
134
+ pub struct MissingEqNonExhaustive1 {
135
+ foo : u32 ,
136
+ #[ non_exhaustive]
137
+ bar : String ,
138
+ }
139
+
140
+ // This is a `non_exhaustive` type so should not warn.
141
+ #[ derive( Debug , PartialEq ) ]
142
+ #[ non_exhaustive]
143
+ pub enum MissingEqNonExhaustive2 {
144
+ Foo ,
145
+ Bar ,
146
+ }
147
+
148
+ // This is a `non_exhaustive` type so should not warn.
149
+ #[ derive( Debug , PartialEq ) ]
150
+ pub enum MissingEqNonExhaustive3 {
151
+ Foo ,
152
+ #[ non_exhaustive]
153
+ Bar ,
154
+ }
155
+
124
156
fn main ( ) { }
You can’t perform that action at this time.
0 commit comments