• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // This file is @generated by syn-internal-codegen.
2 // It is not intended for manual editing.
3 
4 #[cfg(any(feature = "derive", feature = "full"))]
5 use crate::tt::TokenStreamHelper;
6 use crate::*;
7 #[cfg(any(feature = "derive", feature = "full"))]
8 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
9 impl Eq for Abi {}
10 #[cfg(any(feature = "derive", feature = "full"))]
11 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
12 impl PartialEq for Abi {
eq(&self, other: &Self) -> bool13     fn eq(&self, other: &Self) -> bool {
14         self.name == other.name
15     }
16 }
17 #[cfg(any(feature = "derive", feature = "full"))]
18 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
19 impl Eq for AngleBracketedGenericArguments {}
20 #[cfg(any(feature = "derive", feature = "full"))]
21 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
22 impl PartialEq for AngleBracketedGenericArguments {
eq(&self, other: &Self) -> bool23     fn eq(&self, other: &Self) -> bool {
24         self.colon2_token == other.colon2_token && self.args == other.args
25     }
26 }
27 #[cfg(feature = "full")]
28 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
29 impl Eq for Arm {}
30 #[cfg(feature = "full")]
31 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
32 impl PartialEq for Arm {
eq(&self, other: &Self) -> bool33     fn eq(&self, other: &Self) -> bool {
34         self.attrs == other.attrs && self.pat == other.pat && self.guard == other.guard
35             && self.body == other.body && self.comma == other.comma
36     }
37 }
38 #[cfg(any(feature = "derive", feature = "full"))]
39 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
40 impl Eq for AssocConst {}
41 #[cfg(any(feature = "derive", feature = "full"))]
42 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
43 impl PartialEq for AssocConst {
eq(&self, other: &Self) -> bool44     fn eq(&self, other: &Self) -> bool {
45         self.ident == other.ident && self.generics == other.generics
46             && self.value == other.value
47     }
48 }
49 #[cfg(any(feature = "derive", feature = "full"))]
50 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
51 impl Eq for AssocType {}
52 #[cfg(any(feature = "derive", feature = "full"))]
53 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
54 impl PartialEq for AssocType {
eq(&self, other: &Self) -> bool55     fn eq(&self, other: &Self) -> bool {
56         self.ident == other.ident && self.generics == other.generics
57             && self.ty == other.ty
58     }
59 }
60 #[cfg(any(feature = "derive", feature = "full"))]
61 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
62 impl Eq for AttrStyle {}
63 #[cfg(any(feature = "derive", feature = "full"))]
64 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
65 impl PartialEq for AttrStyle {
eq(&self, other: &Self) -> bool66     fn eq(&self, other: &Self) -> bool {
67         match (self, other) {
68             (AttrStyle::Outer, AttrStyle::Outer) => true,
69             (AttrStyle::Inner(_), AttrStyle::Inner(_)) => true,
70             _ => false,
71         }
72     }
73 }
74 #[cfg(any(feature = "derive", feature = "full"))]
75 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
76 impl Eq for Attribute {}
77 #[cfg(any(feature = "derive", feature = "full"))]
78 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
79 impl PartialEq for Attribute {
eq(&self, other: &Self) -> bool80     fn eq(&self, other: &Self) -> bool {
81         self.style == other.style && self.meta == other.meta
82     }
83 }
84 #[cfg(any(feature = "derive", feature = "full"))]
85 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
86 impl Eq for BareFnArg {}
87 #[cfg(any(feature = "derive", feature = "full"))]
88 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
89 impl PartialEq for BareFnArg {
eq(&self, other: &Self) -> bool90     fn eq(&self, other: &Self) -> bool {
91         self.attrs == other.attrs && self.name == other.name && self.ty == other.ty
92     }
93 }
94 #[cfg(any(feature = "derive", feature = "full"))]
95 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
96 impl Eq for BareVariadic {}
97 #[cfg(any(feature = "derive", feature = "full"))]
98 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
99 impl PartialEq for BareVariadic {
eq(&self, other: &Self) -> bool100     fn eq(&self, other: &Self) -> bool {
101         self.attrs == other.attrs && self.name == other.name && self.comma == other.comma
102     }
103 }
104 #[cfg(any(feature = "derive", feature = "full"))]
105 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
106 impl Eq for BinOp {}
107 #[cfg(any(feature = "derive", feature = "full"))]
108 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
109 impl PartialEq for BinOp {
eq(&self, other: &Self) -> bool110     fn eq(&self, other: &Self) -> bool {
111         match (self, other) {
112             (BinOp::Add(_), BinOp::Add(_)) => true,
113             (BinOp::Sub(_), BinOp::Sub(_)) => true,
114             (BinOp::Mul(_), BinOp::Mul(_)) => true,
115             (BinOp::Div(_), BinOp::Div(_)) => true,
116             (BinOp::Rem(_), BinOp::Rem(_)) => true,
117             (BinOp::And(_), BinOp::And(_)) => true,
118             (BinOp::Or(_), BinOp::Or(_)) => true,
119             (BinOp::BitXor(_), BinOp::BitXor(_)) => true,
120             (BinOp::BitAnd(_), BinOp::BitAnd(_)) => true,
121             (BinOp::BitOr(_), BinOp::BitOr(_)) => true,
122             (BinOp::Shl(_), BinOp::Shl(_)) => true,
123             (BinOp::Shr(_), BinOp::Shr(_)) => true,
124             (BinOp::Eq(_), BinOp::Eq(_)) => true,
125             (BinOp::Lt(_), BinOp::Lt(_)) => true,
126             (BinOp::Le(_), BinOp::Le(_)) => true,
127             (BinOp::Ne(_), BinOp::Ne(_)) => true,
128             (BinOp::Ge(_), BinOp::Ge(_)) => true,
129             (BinOp::Gt(_), BinOp::Gt(_)) => true,
130             (BinOp::AddAssign(_), BinOp::AddAssign(_)) => true,
131             (BinOp::SubAssign(_), BinOp::SubAssign(_)) => true,
132             (BinOp::MulAssign(_), BinOp::MulAssign(_)) => true,
133             (BinOp::DivAssign(_), BinOp::DivAssign(_)) => true,
134             (BinOp::RemAssign(_), BinOp::RemAssign(_)) => true,
135             (BinOp::BitXorAssign(_), BinOp::BitXorAssign(_)) => true,
136             (BinOp::BitAndAssign(_), BinOp::BitAndAssign(_)) => true,
137             (BinOp::BitOrAssign(_), BinOp::BitOrAssign(_)) => true,
138             (BinOp::ShlAssign(_), BinOp::ShlAssign(_)) => true,
139             (BinOp::ShrAssign(_), BinOp::ShrAssign(_)) => true,
140             _ => false,
141         }
142     }
143 }
144 #[cfg(feature = "full")]
145 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
146 impl Eq for Block {}
147 #[cfg(feature = "full")]
148 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
149 impl PartialEq for Block {
eq(&self, other: &Self) -> bool150     fn eq(&self, other: &Self) -> bool {
151         self.stmts == other.stmts
152     }
153 }
154 #[cfg(any(feature = "derive", feature = "full"))]
155 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
156 impl Eq for BoundLifetimes {}
157 #[cfg(any(feature = "derive", feature = "full"))]
158 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
159 impl PartialEq for BoundLifetimes {
eq(&self, other: &Self) -> bool160     fn eq(&self, other: &Self) -> bool {
161         self.lifetimes == other.lifetimes
162     }
163 }
164 #[cfg(any(feature = "derive", feature = "full"))]
165 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
166 impl Eq for ConstParam {}
167 #[cfg(any(feature = "derive", feature = "full"))]
168 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
169 impl PartialEq for ConstParam {
eq(&self, other: &Self) -> bool170     fn eq(&self, other: &Self) -> bool {
171         self.attrs == other.attrs && self.ident == other.ident && self.ty == other.ty
172             && self.eq_token == other.eq_token && self.default == other.default
173     }
174 }
175 #[cfg(any(feature = "derive", feature = "full"))]
176 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
177 impl Eq for Constraint {}
178 #[cfg(any(feature = "derive", feature = "full"))]
179 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
180 impl PartialEq for Constraint {
eq(&self, other: &Self) -> bool181     fn eq(&self, other: &Self) -> bool {
182         self.ident == other.ident && self.generics == other.generics
183             && self.bounds == other.bounds
184     }
185 }
186 #[cfg(feature = "derive")]
187 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
188 impl Eq for Data {}
189 #[cfg(feature = "derive")]
190 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
191 impl PartialEq for Data {
eq(&self, other: &Self) -> bool192     fn eq(&self, other: &Self) -> bool {
193         match (self, other) {
194             (Data::Struct(self0), Data::Struct(other0)) => self0 == other0,
195             (Data::Enum(self0), Data::Enum(other0)) => self0 == other0,
196             (Data::Union(self0), Data::Union(other0)) => self0 == other0,
197             _ => false,
198         }
199     }
200 }
201 #[cfg(feature = "derive")]
202 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
203 impl Eq for DataEnum {}
204 #[cfg(feature = "derive")]
205 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
206 impl PartialEq for DataEnum {
eq(&self, other: &Self) -> bool207     fn eq(&self, other: &Self) -> bool {
208         self.variants == other.variants
209     }
210 }
211 #[cfg(feature = "derive")]
212 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
213 impl Eq for DataStruct {}
214 #[cfg(feature = "derive")]
215 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
216 impl PartialEq for DataStruct {
eq(&self, other: &Self) -> bool217     fn eq(&self, other: &Self) -> bool {
218         self.fields == other.fields && self.semi_token == other.semi_token
219     }
220 }
221 #[cfg(feature = "derive")]
222 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
223 impl Eq for DataUnion {}
224 #[cfg(feature = "derive")]
225 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
226 impl PartialEq for DataUnion {
eq(&self, other: &Self) -> bool227     fn eq(&self, other: &Self) -> bool {
228         self.fields == other.fields
229     }
230 }
231 #[cfg(feature = "derive")]
232 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
233 impl Eq for DeriveInput {}
234 #[cfg(feature = "derive")]
235 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
236 impl PartialEq for DeriveInput {
eq(&self, other: &Self) -> bool237     fn eq(&self, other: &Self) -> bool {
238         self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident
239             && self.generics == other.generics && self.data == other.data
240     }
241 }
242 #[cfg(any(feature = "derive", feature = "full"))]
243 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
244 impl Eq for Expr {}
245 #[cfg(any(feature = "derive", feature = "full"))]
246 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
247 impl PartialEq for Expr {
eq(&self, other: &Self) -> bool248     fn eq(&self, other: &Self) -> bool {
249         match (self, other) {
250             #[cfg(feature = "full")]
251             (Expr::Array(self0), Expr::Array(other0)) => self0 == other0,
252             #[cfg(feature = "full")]
253             (Expr::Assign(self0), Expr::Assign(other0)) => self0 == other0,
254             #[cfg(feature = "full")]
255             (Expr::Async(self0), Expr::Async(other0)) => self0 == other0,
256             #[cfg(feature = "full")]
257             (Expr::Await(self0), Expr::Await(other0)) => self0 == other0,
258             (Expr::Binary(self0), Expr::Binary(other0)) => self0 == other0,
259             #[cfg(feature = "full")]
260             (Expr::Block(self0), Expr::Block(other0)) => self0 == other0,
261             #[cfg(feature = "full")]
262             (Expr::Break(self0), Expr::Break(other0)) => self0 == other0,
263             (Expr::Call(self0), Expr::Call(other0)) => self0 == other0,
264             (Expr::Cast(self0), Expr::Cast(other0)) => self0 == other0,
265             #[cfg(feature = "full")]
266             (Expr::Closure(self0), Expr::Closure(other0)) => self0 == other0,
267             #[cfg(feature = "full")]
268             (Expr::Const(self0), Expr::Const(other0)) => self0 == other0,
269             #[cfg(feature = "full")]
270             (Expr::Continue(self0), Expr::Continue(other0)) => self0 == other0,
271             (Expr::Field(self0), Expr::Field(other0)) => self0 == other0,
272             #[cfg(feature = "full")]
273             (Expr::ForLoop(self0), Expr::ForLoop(other0)) => self0 == other0,
274             (Expr::Group(self0), Expr::Group(other0)) => self0 == other0,
275             #[cfg(feature = "full")]
276             (Expr::If(self0), Expr::If(other0)) => self0 == other0,
277             (Expr::Index(self0), Expr::Index(other0)) => self0 == other0,
278             #[cfg(feature = "full")]
279             (Expr::Infer(self0), Expr::Infer(other0)) => self0 == other0,
280             #[cfg(feature = "full")]
281             (Expr::Let(self0), Expr::Let(other0)) => self0 == other0,
282             (Expr::Lit(self0), Expr::Lit(other0)) => self0 == other0,
283             #[cfg(feature = "full")]
284             (Expr::Loop(self0), Expr::Loop(other0)) => self0 == other0,
285             (Expr::Macro(self0), Expr::Macro(other0)) => self0 == other0,
286             #[cfg(feature = "full")]
287             (Expr::Match(self0), Expr::Match(other0)) => self0 == other0,
288             #[cfg(feature = "full")]
289             (Expr::MethodCall(self0), Expr::MethodCall(other0)) => self0 == other0,
290             (Expr::Paren(self0), Expr::Paren(other0)) => self0 == other0,
291             (Expr::Path(self0), Expr::Path(other0)) => self0 == other0,
292             #[cfg(feature = "full")]
293             (Expr::Range(self0), Expr::Range(other0)) => self0 == other0,
294             #[cfg(feature = "full")]
295             (Expr::Reference(self0), Expr::Reference(other0)) => self0 == other0,
296             #[cfg(feature = "full")]
297             (Expr::Repeat(self0), Expr::Repeat(other0)) => self0 == other0,
298             #[cfg(feature = "full")]
299             (Expr::Return(self0), Expr::Return(other0)) => self0 == other0,
300             #[cfg(feature = "full")]
301             (Expr::Struct(self0), Expr::Struct(other0)) => self0 == other0,
302             #[cfg(feature = "full")]
303             (Expr::Try(self0), Expr::Try(other0)) => self0 == other0,
304             #[cfg(feature = "full")]
305             (Expr::TryBlock(self0), Expr::TryBlock(other0)) => self0 == other0,
306             #[cfg(feature = "full")]
307             (Expr::Tuple(self0), Expr::Tuple(other0)) => self0 == other0,
308             (Expr::Unary(self0), Expr::Unary(other0)) => self0 == other0,
309             #[cfg(feature = "full")]
310             (Expr::Unsafe(self0), Expr::Unsafe(other0)) => self0 == other0,
311             (Expr::Verbatim(self0), Expr::Verbatim(other0)) => {
312                 TokenStreamHelper(self0) == TokenStreamHelper(other0)
313             }
314             #[cfg(feature = "full")]
315             (Expr::While(self0), Expr::While(other0)) => self0 == other0,
316             #[cfg(feature = "full")]
317             (Expr::Yield(self0), Expr::Yield(other0)) => self0 == other0,
318             _ => false,
319         }
320     }
321 }
322 #[cfg(feature = "full")]
323 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
324 impl Eq for ExprArray {}
325 #[cfg(feature = "full")]
326 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
327 impl PartialEq for ExprArray {
eq(&self, other: &Self) -> bool328     fn eq(&self, other: &Self) -> bool {
329         self.attrs == other.attrs && self.elems == other.elems
330     }
331 }
332 #[cfg(feature = "full")]
333 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
334 impl Eq for ExprAssign {}
335 #[cfg(feature = "full")]
336 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
337 impl PartialEq for ExprAssign {
eq(&self, other: &Self) -> bool338     fn eq(&self, other: &Self) -> bool {
339         self.attrs == other.attrs && self.left == other.left && self.right == other.right
340     }
341 }
342 #[cfg(feature = "full")]
343 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
344 impl Eq for ExprAsync {}
345 #[cfg(feature = "full")]
346 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
347 impl PartialEq for ExprAsync {
eq(&self, other: &Self) -> bool348     fn eq(&self, other: &Self) -> bool {
349         self.attrs == other.attrs && self.capture == other.capture
350             && self.block == other.block
351     }
352 }
353 #[cfg(feature = "full")]
354 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
355 impl Eq for ExprAwait {}
356 #[cfg(feature = "full")]
357 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
358 impl PartialEq for ExprAwait {
eq(&self, other: &Self) -> bool359     fn eq(&self, other: &Self) -> bool {
360         self.attrs == other.attrs && self.base == other.base
361     }
362 }
363 #[cfg(any(feature = "derive", feature = "full"))]
364 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
365 impl Eq for ExprBinary {}
366 #[cfg(any(feature = "derive", feature = "full"))]
367 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
368 impl PartialEq for ExprBinary {
eq(&self, other: &Self) -> bool369     fn eq(&self, other: &Self) -> bool {
370         self.attrs == other.attrs && self.left == other.left && self.op == other.op
371             && self.right == other.right
372     }
373 }
374 #[cfg(feature = "full")]
375 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
376 impl Eq for ExprBlock {}
377 #[cfg(feature = "full")]
378 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
379 impl PartialEq for ExprBlock {
eq(&self, other: &Self) -> bool380     fn eq(&self, other: &Self) -> bool {
381         self.attrs == other.attrs && self.label == other.label
382             && self.block == other.block
383     }
384 }
385 #[cfg(feature = "full")]
386 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
387 impl Eq for ExprBreak {}
388 #[cfg(feature = "full")]
389 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
390 impl PartialEq for ExprBreak {
eq(&self, other: &Self) -> bool391     fn eq(&self, other: &Self) -> bool {
392         self.attrs == other.attrs && self.label == other.label && self.expr == other.expr
393     }
394 }
395 #[cfg(any(feature = "derive", feature = "full"))]
396 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
397 impl Eq for ExprCall {}
398 #[cfg(any(feature = "derive", feature = "full"))]
399 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
400 impl PartialEq for ExprCall {
eq(&self, other: &Self) -> bool401     fn eq(&self, other: &Self) -> bool {
402         self.attrs == other.attrs && self.func == other.func && self.args == other.args
403     }
404 }
405 #[cfg(any(feature = "derive", feature = "full"))]
406 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
407 impl Eq for ExprCast {}
408 #[cfg(any(feature = "derive", feature = "full"))]
409 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
410 impl PartialEq for ExprCast {
eq(&self, other: &Self) -> bool411     fn eq(&self, other: &Self) -> bool {
412         self.attrs == other.attrs && self.expr == other.expr && self.ty == other.ty
413     }
414 }
415 #[cfg(feature = "full")]
416 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
417 impl Eq for ExprClosure {}
418 #[cfg(feature = "full")]
419 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
420 impl PartialEq for ExprClosure {
eq(&self, other: &Self) -> bool421     fn eq(&self, other: &Self) -> bool {
422         self.attrs == other.attrs && self.lifetimes == other.lifetimes
423             && self.constness == other.constness && self.movability == other.movability
424             && self.asyncness == other.asyncness && self.capture == other.capture
425             && self.inputs == other.inputs && self.output == other.output
426             && self.body == other.body
427     }
428 }
429 #[cfg(feature = "full")]
430 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
431 impl Eq for ExprConst {}
432 #[cfg(feature = "full")]
433 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
434 impl PartialEq for ExprConst {
eq(&self, other: &Self) -> bool435     fn eq(&self, other: &Self) -> bool {
436         self.attrs == other.attrs && self.block == other.block
437     }
438 }
439 #[cfg(feature = "full")]
440 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
441 impl Eq for ExprContinue {}
442 #[cfg(feature = "full")]
443 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
444 impl PartialEq for ExprContinue {
eq(&self, other: &Self) -> bool445     fn eq(&self, other: &Self) -> bool {
446         self.attrs == other.attrs && self.label == other.label
447     }
448 }
449 #[cfg(any(feature = "derive", feature = "full"))]
450 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
451 impl Eq for ExprField {}
452 #[cfg(any(feature = "derive", feature = "full"))]
453 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
454 impl PartialEq for ExprField {
eq(&self, other: &Self) -> bool455     fn eq(&self, other: &Self) -> bool {
456         self.attrs == other.attrs && self.base == other.base
457             && self.member == other.member
458     }
459 }
460 #[cfg(feature = "full")]
461 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
462 impl Eq for ExprForLoop {}
463 #[cfg(feature = "full")]
464 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
465 impl PartialEq for ExprForLoop {
eq(&self, other: &Self) -> bool466     fn eq(&self, other: &Self) -> bool {
467         self.attrs == other.attrs && self.label == other.label && self.pat == other.pat
468             && self.expr == other.expr && self.body == other.body
469     }
470 }
471 #[cfg(any(feature = "derive", feature = "full"))]
472 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
473 impl Eq for ExprGroup {}
474 #[cfg(any(feature = "derive", feature = "full"))]
475 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
476 impl PartialEq for ExprGroup {
eq(&self, other: &Self) -> bool477     fn eq(&self, other: &Self) -> bool {
478         self.attrs == other.attrs && self.expr == other.expr
479     }
480 }
481 #[cfg(feature = "full")]
482 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
483 impl Eq for ExprIf {}
484 #[cfg(feature = "full")]
485 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
486 impl PartialEq for ExprIf {
eq(&self, other: &Self) -> bool487     fn eq(&self, other: &Self) -> bool {
488         self.attrs == other.attrs && self.cond == other.cond
489             && self.then_branch == other.then_branch
490             && self.else_branch == other.else_branch
491     }
492 }
493 #[cfg(any(feature = "derive", feature = "full"))]
494 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
495 impl Eq for ExprIndex {}
496 #[cfg(any(feature = "derive", feature = "full"))]
497 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
498 impl PartialEq for ExprIndex {
eq(&self, other: &Self) -> bool499     fn eq(&self, other: &Self) -> bool {
500         self.attrs == other.attrs && self.expr == other.expr && self.index == other.index
501     }
502 }
503 #[cfg(feature = "full")]
504 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
505 impl Eq for ExprInfer {}
506 #[cfg(feature = "full")]
507 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
508 impl PartialEq for ExprInfer {
eq(&self, other: &Self) -> bool509     fn eq(&self, other: &Self) -> bool {
510         self.attrs == other.attrs
511     }
512 }
513 #[cfg(feature = "full")]
514 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
515 impl Eq for ExprLet {}
516 #[cfg(feature = "full")]
517 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
518 impl PartialEq for ExprLet {
eq(&self, other: &Self) -> bool519     fn eq(&self, other: &Self) -> bool {
520         self.attrs == other.attrs && self.pat == other.pat && self.expr == other.expr
521     }
522 }
523 #[cfg(any(feature = "derive", feature = "full"))]
524 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
525 impl Eq for ExprLit {}
526 #[cfg(any(feature = "derive", feature = "full"))]
527 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
528 impl PartialEq for ExprLit {
eq(&self, other: &Self) -> bool529     fn eq(&self, other: &Self) -> bool {
530         self.attrs == other.attrs && self.lit == other.lit
531     }
532 }
533 #[cfg(feature = "full")]
534 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
535 impl Eq for ExprLoop {}
536 #[cfg(feature = "full")]
537 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
538 impl PartialEq for ExprLoop {
eq(&self, other: &Self) -> bool539     fn eq(&self, other: &Self) -> bool {
540         self.attrs == other.attrs && self.label == other.label && self.body == other.body
541     }
542 }
543 #[cfg(any(feature = "derive", feature = "full"))]
544 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
545 impl Eq for ExprMacro {}
546 #[cfg(any(feature = "derive", feature = "full"))]
547 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
548 impl PartialEq for ExprMacro {
eq(&self, other: &Self) -> bool549     fn eq(&self, other: &Self) -> bool {
550         self.attrs == other.attrs && self.mac == other.mac
551     }
552 }
553 #[cfg(feature = "full")]
554 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
555 impl Eq for ExprMatch {}
556 #[cfg(feature = "full")]
557 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
558 impl PartialEq for ExprMatch {
eq(&self, other: &Self) -> bool559     fn eq(&self, other: &Self) -> bool {
560         self.attrs == other.attrs && self.expr == other.expr && self.arms == other.arms
561     }
562 }
563 #[cfg(feature = "full")]
564 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
565 impl Eq for ExprMethodCall {}
566 #[cfg(feature = "full")]
567 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
568 impl PartialEq for ExprMethodCall {
eq(&self, other: &Self) -> bool569     fn eq(&self, other: &Self) -> bool {
570         self.attrs == other.attrs && self.receiver == other.receiver
571             && self.method == other.method && self.turbofish == other.turbofish
572             && self.args == other.args
573     }
574 }
575 #[cfg(any(feature = "derive", feature = "full"))]
576 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
577 impl Eq for ExprParen {}
578 #[cfg(any(feature = "derive", feature = "full"))]
579 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
580 impl PartialEq for ExprParen {
eq(&self, other: &Self) -> bool581     fn eq(&self, other: &Self) -> bool {
582         self.attrs == other.attrs && self.expr == other.expr
583     }
584 }
585 #[cfg(any(feature = "derive", feature = "full"))]
586 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
587 impl Eq for ExprPath {}
588 #[cfg(any(feature = "derive", feature = "full"))]
589 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
590 impl PartialEq for ExprPath {
eq(&self, other: &Self) -> bool591     fn eq(&self, other: &Self) -> bool {
592         self.attrs == other.attrs && self.qself == other.qself && self.path == other.path
593     }
594 }
595 #[cfg(feature = "full")]
596 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
597 impl Eq for ExprRange {}
598 #[cfg(feature = "full")]
599 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
600 impl PartialEq for ExprRange {
eq(&self, other: &Self) -> bool601     fn eq(&self, other: &Self) -> bool {
602         self.attrs == other.attrs && self.start == other.start
603             && self.limits == other.limits && self.end == other.end
604     }
605 }
606 #[cfg(feature = "full")]
607 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
608 impl Eq for ExprReference {}
609 #[cfg(feature = "full")]
610 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
611 impl PartialEq for ExprReference {
eq(&self, other: &Self) -> bool612     fn eq(&self, other: &Self) -> bool {
613         self.attrs == other.attrs && self.mutability == other.mutability
614             && self.expr == other.expr
615     }
616 }
617 #[cfg(feature = "full")]
618 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
619 impl Eq for ExprRepeat {}
620 #[cfg(feature = "full")]
621 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
622 impl PartialEq for ExprRepeat {
eq(&self, other: &Self) -> bool623     fn eq(&self, other: &Self) -> bool {
624         self.attrs == other.attrs && self.expr == other.expr && self.len == other.len
625     }
626 }
627 #[cfg(feature = "full")]
628 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
629 impl Eq for ExprReturn {}
630 #[cfg(feature = "full")]
631 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
632 impl PartialEq for ExprReturn {
eq(&self, other: &Self) -> bool633     fn eq(&self, other: &Self) -> bool {
634         self.attrs == other.attrs && self.expr == other.expr
635     }
636 }
637 #[cfg(feature = "full")]
638 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
639 impl Eq for ExprStruct {}
640 #[cfg(feature = "full")]
641 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
642 impl PartialEq for ExprStruct {
eq(&self, other: &Self) -> bool643     fn eq(&self, other: &Self) -> bool {
644         self.attrs == other.attrs && self.qself == other.qself && self.path == other.path
645             && self.fields == other.fields && self.dot2_token == other.dot2_token
646             && self.rest == other.rest
647     }
648 }
649 #[cfg(feature = "full")]
650 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
651 impl Eq for ExprTry {}
652 #[cfg(feature = "full")]
653 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
654 impl PartialEq for ExprTry {
eq(&self, other: &Self) -> bool655     fn eq(&self, other: &Self) -> bool {
656         self.attrs == other.attrs && self.expr == other.expr
657     }
658 }
659 #[cfg(feature = "full")]
660 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
661 impl Eq for ExprTryBlock {}
662 #[cfg(feature = "full")]
663 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
664 impl PartialEq for ExprTryBlock {
eq(&self, other: &Self) -> bool665     fn eq(&self, other: &Self) -> bool {
666         self.attrs == other.attrs && self.block == other.block
667     }
668 }
669 #[cfg(feature = "full")]
670 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
671 impl Eq for ExprTuple {}
672 #[cfg(feature = "full")]
673 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
674 impl PartialEq for ExprTuple {
eq(&self, other: &Self) -> bool675     fn eq(&self, other: &Self) -> bool {
676         self.attrs == other.attrs && self.elems == other.elems
677     }
678 }
679 #[cfg(any(feature = "derive", feature = "full"))]
680 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
681 impl Eq for ExprUnary {}
682 #[cfg(any(feature = "derive", feature = "full"))]
683 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
684 impl PartialEq for ExprUnary {
eq(&self, other: &Self) -> bool685     fn eq(&self, other: &Self) -> bool {
686         self.attrs == other.attrs && self.op == other.op && self.expr == other.expr
687     }
688 }
689 #[cfg(feature = "full")]
690 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
691 impl Eq for ExprUnsafe {}
692 #[cfg(feature = "full")]
693 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
694 impl PartialEq for ExprUnsafe {
eq(&self, other: &Self) -> bool695     fn eq(&self, other: &Self) -> bool {
696         self.attrs == other.attrs && self.block == other.block
697     }
698 }
699 #[cfg(feature = "full")]
700 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
701 impl Eq for ExprWhile {}
702 #[cfg(feature = "full")]
703 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
704 impl PartialEq for ExprWhile {
eq(&self, other: &Self) -> bool705     fn eq(&self, other: &Self) -> bool {
706         self.attrs == other.attrs && self.label == other.label && self.cond == other.cond
707             && self.body == other.body
708     }
709 }
710 #[cfg(feature = "full")]
711 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
712 impl Eq for ExprYield {}
713 #[cfg(feature = "full")]
714 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
715 impl PartialEq for ExprYield {
eq(&self, other: &Self) -> bool716     fn eq(&self, other: &Self) -> bool {
717         self.attrs == other.attrs && self.expr == other.expr
718     }
719 }
720 #[cfg(any(feature = "derive", feature = "full"))]
721 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
722 impl Eq for Field {}
723 #[cfg(any(feature = "derive", feature = "full"))]
724 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
725 impl PartialEq for Field {
eq(&self, other: &Self) -> bool726     fn eq(&self, other: &Self) -> bool {
727         self.attrs == other.attrs && self.vis == other.vis
728             && self.mutability == other.mutability && self.ident == other.ident
729             && self.colon_token == other.colon_token && self.ty == other.ty
730     }
731 }
732 #[cfg(any(feature = "derive", feature = "full"))]
733 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
734 impl Eq for FieldMutability {}
735 #[cfg(any(feature = "derive", feature = "full"))]
736 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
737 impl PartialEq for FieldMutability {
eq(&self, other: &Self) -> bool738     fn eq(&self, other: &Self) -> bool {
739         match (self, other) {
740             (FieldMutability::None, FieldMutability::None) => true,
741         }
742     }
743 }
744 #[cfg(feature = "full")]
745 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
746 impl Eq for FieldPat {}
747 #[cfg(feature = "full")]
748 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
749 impl PartialEq for FieldPat {
eq(&self, other: &Self) -> bool750     fn eq(&self, other: &Self) -> bool {
751         self.attrs == other.attrs && self.member == other.member
752             && self.colon_token == other.colon_token && self.pat == other.pat
753     }
754 }
755 #[cfg(feature = "full")]
756 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
757 impl Eq for FieldValue {}
758 #[cfg(feature = "full")]
759 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
760 impl PartialEq for FieldValue {
eq(&self, other: &Self) -> bool761     fn eq(&self, other: &Self) -> bool {
762         self.attrs == other.attrs && self.member == other.member
763             && self.colon_token == other.colon_token && self.expr == other.expr
764     }
765 }
766 #[cfg(any(feature = "derive", feature = "full"))]
767 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
768 impl Eq for Fields {}
769 #[cfg(any(feature = "derive", feature = "full"))]
770 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
771 impl PartialEq for Fields {
eq(&self, other: &Self) -> bool772     fn eq(&self, other: &Self) -> bool {
773         match (self, other) {
774             (Fields::Named(self0), Fields::Named(other0)) => self0 == other0,
775             (Fields::Unnamed(self0), Fields::Unnamed(other0)) => self0 == other0,
776             (Fields::Unit, Fields::Unit) => true,
777             _ => false,
778         }
779     }
780 }
781 #[cfg(any(feature = "derive", feature = "full"))]
782 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
783 impl Eq for FieldsNamed {}
784 #[cfg(any(feature = "derive", feature = "full"))]
785 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
786 impl PartialEq for FieldsNamed {
eq(&self, other: &Self) -> bool787     fn eq(&self, other: &Self) -> bool {
788         self.named == other.named
789     }
790 }
791 #[cfg(any(feature = "derive", feature = "full"))]
792 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
793 impl Eq for FieldsUnnamed {}
794 #[cfg(any(feature = "derive", feature = "full"))]
795 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
796 impl PartialEq for FieldsUnnamed {
eq(&self, other: &Self) -> bool797     fn eq(&self, other: &Self) -> bool {
798         self.unnamed == other.unnamed
799     }
800 }
801 #[cfg(feature = "full")]
802 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
803 impl Eq for File {}
804 #[cfg(feature = "full")]
805 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
806 impl PartialEq for File {
eq(&self, other: &Self) -> bool807     fn eq(&self, other: &Self) -> bool {
808         self.shebang == other.shebang && self.attrs == other.attrs
809             && self.items == other.items
810     }
811 }
812 #[cfg(feature = "full")]
813 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
814 impl Eq for FnArg {}
815 #[cfg(feature = "full")]
816 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
817 impl PartialEq for FnArg {
eq(&self, other: &Self) -> bool818     fn eq(&self, other: &Self) -> bool {
819         match (self, other) {
820             (FnArg::Receiver(self0), FnArg::Receiver(other0)) => self0 == other0,
821             (FnArg::Typed(self0), FnArg::Typed(other0)) => self0 == other0,
822             _ => false,
823         }
824     }
825 }
826 #[cfg(feature = "full")]
827 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
828 impl Eq for ForeignItem {}
829 #[cfg(feature = "full")]
830 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
831 impl PartialEq for ForeignItem {
eq(&self, other: &Self) -> bool832     fn eq(&self, other: &Self) -> bool {
833         match (self, other) {
834             (ForeignItem::Fn(self0), ForeignItem::Fn(other0)) => self0 == other0,
835             (ForeignItem::Static(self0), ForeignItem::Static(other0)) => self0 == other0,
836             (ForeignItem::Type(self0), ForeignItem::Type(other0)) => self0 == other0,
837             (ForeignItem::Macro(self0), ForeignItem::Macro(other0)) => self0 == other0,
838             (ForeignItem::Verbatim(self0), ForeignItem::Verbatim(other0)) => {
839                 TokenStreamHelper(self0) == TokenStreamHelper(other0)
840             }
841             _ => false,
842         }
843     }
844 }
845 #[cfg(feature = "full")]
846 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
847 impl Eq for ForeignItemFn {}
848 #[cfg(feature = "full")]
849 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
850 impl PartialEq for ForeignItemFn {
eq(&self, other: &Self) -> bool851     fn eq(&self, other: &Self) -> bool {
852         self.attrs == other.attrs && self.vis == other.vis && self.sig == other.sig
853     }
854 }
855 #[cfg(feature = "full")]
856 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
857 impl Eq for ForeignItemMacro {}
858 #[cfg(feature = "full")]
859 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
860 impl PartialEq for ForeignItemMacro {
eq(&self, other: &Self) -> bool861     fn eq(&self, other: &Self) -> bool {
862         self.attrs == other.attrs && self.mac == other.mac
863             && self.semi_token == other.semi_token
864     }
865 }
866 #[cfg(feature = "full")]
867 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
868 impl Eq for ForeignItemStatic {}
869 #[cfg(feature = "full")]
870 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
871 impl PartialEq for ForeignItemStatic {
eq(&self, other: &Self) -> bool872     fn eq(&self, other: &Self) -> bool {
873         self.attrs == other.attrs && self.vis == other.vis
874             && self.mutability == other.mutability && self.ident == other.ident
875             && self.ty == other.ty
876     }
877 }
878 #[cfg(feature = "full")]
879 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
880 impl Eq for ForeignItemType {}
881 #[cfg(feature = "full")]
882 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
883 impl PartialEq for ForeignItemType {
eq(&self, other: &Self) -> bool884     fn eq(&self, other: &Self) -> bool {
885         self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident
886             && self.generics == other.generics
887     }
888 }
889 #[cfg(any(feature = "derive", feature = "full"))]
890 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
891 impl Eq for GenericArgument {}
892 #[cfg(any(feature = "derive", feature = "full"))]
893 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
894 impl PartialEq for GenericArgument {
eq(&self, other: &Self) -> bool895     fn eq(&self, other: &Self) -> bool {
896         match (self, other) {
897             (GenericArgument::Lifetime(self0), GenericArgument::Lifetime(other0)) => {
898                 self0 == other0
899             }
900             (GenericArgument::Type(self0), GenericArgument::Type(other0)) => {
901                 self0 == other0
902             }
903             (GenericArgument::Const(self0), GenericArgument::Const(other0)) => {
904                 self0 == other0
905             }
906             (GenericArgument::AssocType(self0), GenericArgument::AssocType(other0)) => {
907                 self0 == other0
908             }
909             (GenericArgument::AssocConst(self0), GenericArgument::AssocConst(other0)) => {
910                 self0 == other0
911             }
912             (GenericArgument::Constraint(self0), GenericArgument::Constraint(other0)) => {
913                 self0 == other0
914             }
915             _ => false,
916         }
917     }
918 }
919 #[cfg(any(feature = "derive", feature = "full"))]
920 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
921 impl Eq for GenericParam {}
922 #[cfg(any(feature = "derive", feature = "full"))]
923 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
924 impl PartialEq for GenericParam {
eq(&self, other: &Self) -> bool925     fn eq(&self, other: &Self) -> bool {
926         match (self, other) {
927             (GenericParam::Lifetime(self0), GenericParam::Lifetime(other0)) => {
928                 self0 == other0
929             }
930             (GenericParam::Type(self0), GenericParam::Type(other0)) => self0 == other0,
931             (GenericParam::Const(self0), GenericParam::Const(other0)) => self0 == other0,
932             _ => false,
933         }
934     }
935 }
936 #[cfg(any(feature = "derive", feature = "full"))]
937 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
938 impl Eq for Generics {}
939 #[cfg(any(feature = "derive", feature = "full"))]
940 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
941 impl PartialEq for Generics {
eq(&self, other: &Self) -> bool942     fn eq(&self, other: &Self) -> bool {
943         self.lt_token == other.lt_token && self.params == other.params
944             && self.gt_token == other.gt_token && self.where_clause == other.where_clause
945     }
946 }
947 #[cfg(feature = "full")]
948 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
949 impl Eq for ImplItem {}
950 #[cfg(feature = "full")]
951 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
952 impl PartialEq for ImplItem {
eq(&self, other: &Self) -> bool953     fn eq(&self, other: &Self) -> bool {
954         match (self, other) {
955             (ImplItem::Const(self0), ImplItem::Const(other0)) => self0 == other0,
956             (ImplItem::Fn(self0), ImplItem::Fn(other0)) => self0 == other0,
957             (ImplItem::Type(self0), ImplItem::Type(other0)) => self0 == other0,
958             (ImplItem::Macro(self0), ImplItem::Macro(other0)) => self0 == other0,
959             (ImplItem::Verbatim(self0), ImplItem::Verbatim(other0)) => {
960                 TokenStreamHelper(self0) == TokenStreamHelper(other0)
961             }
962             _ => false,
963         }
964     }
965 }
966 #[cfg(feature = "full")]
967 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
968 impl Eq for ImplItemConst {}
969 #[cfg(feature = "full")]
970 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
971 impl PartialEq for ImplItemConst {
eq(&self, other: &Self) -> bool972     fn eq(&self, other: &Self) -> bool {
973         self.attrs == other.attrs && self.vis == other.vis
974             && self.defaultness == other.defaultness && self.ident == other.ident
975             && self.generics == other.generics && self.ty == other.ty
976             && self.expr == other.expr
977     }
978 }
979 #[cfg(feature = "full")]
980 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
981 impl Eq for ImplItemFn {}
982 #[cfg(feature = "full")]
983 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
984 impl PartialEq for ImplItemFn {
eq(&self, other: &Self) -> bool985     fn eq(&self, other: &Self) -> bool {
986         self.attrs == other.attrs && self.vis == other.vis
987             && self.defaultness == other.defaultness && self.sig == other.sig
988             && self.block == other.block
989     }
990 }
991 #[cfg(feature = "full")]
992 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
993 impl Eq for ImplItemMacro {}
994 #[cfg(feature = "full")]
995 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
996 impl PartialEq for ImplItemMacro {
eq(&self, other: &Self) -> bool997     fn eq(&self, other: &Self) -> bool {
998         self.attrs == other.attrs && self.mac == other.mac
999             && self.semi_token == other.semi_token
1000     }
1001 }
1002 #[cfg(feature = "full")]
1003 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1004 impl Eq for ImplItemType {}
1005 #[cfg(feature = "full")]
1006 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1007 impl PartialEq for ImplItemType {
eq(&self, other: &Self) -> bool1008     fn eq(&self, other: &Self) -> bool {
1009         self.attrs == other.attrs && self.vis == other.vis
1010             && self.defaultness == other.defaultness && self.ident == other.ident
1011             && self.generics == other.generics && self.ty == other.ty
1012     }
1013 }
1014 #[cfg(feature = "full")]
1015 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1016 impl Eq for ImplRestriction {}
1017 #[cfg(feature = "full")]
1018 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1019 impl PartialEq for ImplRestriction {
eq(&self, _other: &Self) -> bool1020     fn eq(&self, _other: &Self) -> bool {
1021         match *self {}
1022     }
1023 }
1024 #[cfg(feature = "full")]
1025 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1026 impl Eq for Item {}
1027 #[cfg(feature = "full")]
1028 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1029 impl PartialEq for Item {
eq(&self, other: &Self) -> bool1030     fn eq(&self, other: &Self) -> bool {
1031         match (self, other) {
1032             (Item::Const(self0), Item::Const(other0)) => self0 == other0,
1033             (Item::Enum(self0), Item::Enum(other0)) => self0 == other0,
1034             (Item::ExternCrate(self0), Item::ExternCrate(other0)) => self0 == other0,
1035             (Item::Fn(self0), Item::Fn(other0)) => self0 == other0,
1036             (Item::ForeignMod(self0), Item::ForeignMod(other0)) => self0 == other0,
1037             (Item::Impl(self0), Item::Impl(other0)) => self0 == other0,
1038             (Item::Macro(self0), Item::Macro(other0)) => self0 == other0,
1039             (Item::Mod(self0), Item::Mod(other0)) => self0 == other0,
1040             (Item::Static(self0), Item::Static(other0)) => self0 == other0,
1041             (Item::Struct(self0), Item::Struct(other0)) => self0 == other0,
1042             (Item::Trait(self0), Item::Trait(other0)) => self0 == other0,
1043             (Item::TraitAlias(self0), Item::TraitAlias(other0)) => self0 == other0,
1044             (Item::Type(self0), Item::Type(other0)) => self0 == other0,
1045             (Item::Union(self0), Item::Union(other0)) => self0 == other0,
1046             (Item::Use(self0), Item::Use(other0)) => self0 == other0,
1047             (Item::Verbatim(self0), Item::Verbatim(other0)) => {
1048                 TokenStreamHelper(self0) == TokenStreamHelper(other0)
1049             }
1050             _ => false,
1051         }
1052     }
1053 }
1054 #[cfg(feature = "full")]
1055 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1056 impl Eq for ItemConst {}
1057 #[cfg(feature = "full")]
1058 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1059 impl PartialEq for ItemConst {
eq(&self, other: &Self) -> bool1060     fn eq(&self, other: &Self) -> bool {
1061         self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident
1062             && self.generics == other.generics && self.ty == other.ty
1063             && self.expr == other.expr
1064     }
1065 }
1066 #[cfg(feature = "full")]
1067 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1068 impl Eq for ItemEnum {}
1069 #[cfg(feature = "full")]
1070 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1071 impl PartialEq for ItemEnum {
eq(&self, other: &Self) -> bool1072     fn eq(&self, other: &Self) -> bool {
1073         self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident
1074             && self.generics == other.generics && self.variants == other.variants
1075     }
1076 }
1077 #[cfg(feature = "full")]
1078 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1079 impl Eq for ItemExternCrate {}
1080 #[cfg(feature = "full")]
1081 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1082 impl PartialEq for ItemExternCrate {
eq(&self, other: &Self) -> bool1083     fn eq(&self, other: &Self) -> bool {
1084         self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident
1085             && self.rename == other.rename
1086     }
1087 }
1088 #[cfg(feature = "full")]
1089 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1090 impl Eq for ItemFn {}
1091 #[cfg(feature = "full")]
1092 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1093 impl PartialEq for ItemFn {
eq(&self, other: &Self) -> bool1094     fn eq(&self, other: &Self) -> bool {
1095         self.attrs == other.attrs && self.vis == other.vis && self.sig == other.sig
1096             && self.block == other.block
1097     }
1098 }
1099 #[cfg(feature = "full")]
1100 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1101 impl Eq for ItemForeignMod {}
1102 #[cfg(feature = "full")]
1103 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1104 impl PartialEq for ItemForeignMod {
eq(&self, other: &Self) -> bool1105     fn eq(&self, other: &Self) -> bool {
1106         self.attrs == other.attrs && self.unsafety == other.unsafety
1107             && self.abi == other.abi && self.items == other.items
1108     }
1109 }
1110 #[cfg(feature = "full")]
1111 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1112 impl Eq for ItemImpl {}
1113 #[cfg(feature = "full")]
1114 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1115 impl PartialEq for ItemImpl {
eq(&self, other: &Self) -> bool1116     fn eq(&self, other: &Self) -> bool {
1117         self.attrs == other.attrs && self.defaultness == other.defaultness
1118             && self.unsafety == other.unsafety && self.generics == other.generics
1119             && self.trait_ == other.trait_ && self.self_ty == other.self_ty
1120             && self.items == other.items
1121     }
1122 }
1123 #[cfg(feature = "full")]
1124 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1125 impl Eq for ItemMacro {}
1126 #[cfg(feature = "full")]
1127 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1128 impl PartialEq for ItemMacro {
eq(&self, other: &Self) -> bool1129     fn eq(&self, other: &Self) -> bool {
1130         self.attrs == other.attrs && self.ident == other.ident && self.mac == other.mac
1131             && self.semi_token == other.semi_token
1132     }
1133 }
1134 #[cfg(feature = "full")]
1135 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1136 impl Eq for ItemMod {}
1137 #[cfg(feature = "full")]
1138 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1139 impl PartialEq for ItemMod {
eq(&self, other: &Self) -> bool1140     fn eq(&self, other: &Self) -> bool {
1141         self.attrs == other.attrs && self.vis == other.vis
1142             && self.unsafety == other.unsafety && self.ident == other.ident
1143             && self.content == other.content && self.semi == other.semi
1144     }
1145 }
1146 #[cfg(feature = "full")]
1147 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1148 impl Eq for ItemStatic {}
1149 #[cfg(feature = "full")]
1150 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1151 impl PartialEq for ItemStatic {
eq(&self, other: &Self) -> bool1152     fn eq(&self, other: &Self) -> bool {
1153         self.attrs == other.attrs && self.vis == other.vis
1154             && self.mutability == other.mutability && self.ident == other.ident
1155             && self.ty == other.ty && self.expr == other.expr
1156     }
1157 }
1158 #[cfg(feature = "full")]
1159 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1160 impl Eq for ItemStruct {}
1161 #[cfg(feature = "full")]
1162 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1163 impl PartialEq for ItemStruct {
eq(&self, other: &Self) -> bool1164     fn eq(&self, other: &Self) -> bool {
1165         self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident
1166             && self.generics == other.generics && self.fields == other.fields
1167             && self.semi_token == other.semi_token
1168     }
1169 }
1170 #[cfg(feature = "full")]
1171 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1172 impl Eq for ItemTrait {}
1173 #[cfg(feature = "full")]
1174 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1175 impl PartialEq for ItemTrait {
eq(&self, other: &Self) -> bool1176     fn eq(&self, other: &Self) -> bool {
1177         self.attrs == other.attrs && self.vis == other.vis
1178             && self.unsafety == other.unsafety && self.auto_token == other.auto_token
1179             && self.restriction == other.restriction && self.ident == other.ident
1180             && self.generics == other.generics && self.colon_token == other.colon_token
1181             && self.supertraits == other.supertraits && self.items == other.items
1182     }
1183 }
1184 #[cfg(feature = "full")]
1185 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1186 impl Eq for ItemTraitAlias {}
1187 #[cfg(feature = "full")]
1188 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1189 impl PartialEq for ItemTraitAlias {
eq(&self, other: &Self) -> bool1190     fn eq(&self, other: &Self) -> bool {
1191         self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident
1192             && self.generics == other.generics && self.bounds == other.bounds
1193     }
1194 }
1195 #[cfg(feature = "full")]
1196 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1197 impl Eq for ItemType {}
1198 #[cfg(feature = "full")]
1199 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1200 impl PartialEq for ItemType {
eq(&self, other: &Self) -> bool1201     fn eq(&self, other: &Self) -> bool {
1202         self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident
1203             && self.generics == other.generics && self.ty == other.ty
1204     }
1205 }
1206 #[cfg(feature = "full")]
1207 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1208 impl Eq for ItemUnion {}
1209 #[cfg(feature = "full")]
1210 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1211 impl PartialEq for ItemUnion {
eq(&self, other: &Self) -> bool1212     fn eq(&self, other: &Self) -> bool {
1213         self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident
1214             && self.generics == other.generics && self.fields == other.fields
1215     }
1216 }
1217 #[cfg(feature = "full")]
1218 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1219 impl Eq for ItemUse {}
1220 #[cfg(feature = "full")]
1221 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1222 impl PartialEq for ItemUse {
eq(&self, other: &Self) -> bool1223     fn eq(&self, other: &Self) -> bool {
1224         self.attrs == other.attrs && self.vis == other.vis
1225             && self.leading_colon == other.leading_colon && self.tree == other.tree
1226     }
1227 }
1228 #[cfg(feature = "full")]
1229 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1230 impl Eq for Label {}
1231 #[cfg(feature = "full")]
1232 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1233 impl PartialEq for Label {
eq(&self, other: &Self) -> bool1234     fn eq(&self, other: &Self) -> bool {
1235         self.name == other.name
1236     }
1237 }
1238 #[cfg(any(feature = "derive", feature = "full"))]
1239 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1240 impl Eq for LifetimeParam {}
1241 #[cfg(any(feature = "derive", feature = "full"))]
1242 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1243 impl PartialEq for LifetimeParam {
eq(&self, other: &Self) -> bool1244     fn eq(&self, other: &Self) -> bool {
1245         self.attrs == other.attrs && self.lifetime == other.lifetime
1246             && self.colon_token == other.colon_token && self.bounds == other.bounds
1247     }
1248 }
1249 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1250 impl Eq for Lit {}
1251 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1252 impl PartialEq for Lit {
eq(&self, other: &Self) -> bool1253     fn eq(&self, other: &Self) -> bool {
1254         match (self, other) {
1255             (Lit::Str(self0), Lit::Str(other0)) => self0 == other0,
1256             (Lit::ByteStr(self0), Lit::ByteStr(other0)) => self0 == other0,
1257             (Lit::Byte(self0), Lit::Byte(other0)) => self0 == other0,
1258             (Lit::Char(self0), Lit::Char(other0)) => self0 == other0,
1259             (Lit::Int(self0), Lit::Int(other0)) => self0 == other0,
1260             (Lit::Float(self0), Lit::Float(other0)) => self0 == other0,
1261             (Lit::Bool(self0), Lit::Bool(other0)) => self0 == other0,
1262             (Lit::Verbatim(self0), Lit::Verbatim(other0)) => {
1263                 self0.to_string() == other0.to_string()
1264             }
1265             _ => false,
1266         }
1267     }
1268 }
1269 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1270 impl Eq for LitBool {}
1271 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1272 impl PartialEq for LitBool {
eq(&self, other: &Self) -> bool1273     fn eq(&self, other: &Self) -> bool {
1274         self.value == other.value
1275     }
1276 }
1277 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1278 impl Eq for LitByte {}
1279 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1280 impl Eq for LitByteStr {}
1281 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1282 impl Eq for LitChar {}
1283 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1284 impl Eq for LitFloat {}
1285 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1286 impl Eq for LitInt {}
1287 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1288 impl Eq for LitStr {}
1289 #[cfg(feature = "full")]
1290 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1291 impl Eq for Local {}
1292 #[cfg(feature = "full")]
1293 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1294 impl PartialEq for Local {
eq(&self, other: &Self) -> bool1295     fn eq(&self, other: &Self) -> bool {
1296         self.attrs == other.attrs && self.pat == other.pat && self.init == other.init
1297     }
1298 }
1299 #[cfg(feature = "full")]
1300 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1301 impl Eq for LocalInit {}
1302 #[cfg(feature = "full")]
1303 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1304 impl PartialEq for LocalInit {
eq(&self, other: &Self) -> bool1305     fn eq(&self, other: &Self) -> bool {
1306         self.expr == other.expr && self.diverge == other.diverge
1307     }
1308 }
1309 #[cfg(any(feature = "derive", feature = "full"))]
1310 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1311 impl Eq for Macro {}
1312 #[cfg(any(feature = "derive", feature = "full"))]
1313 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1314 impl PartialEq for Macro {
eq(&self, other: &Self) -> bool1315     fn eq(&self, other: &Self) -> bool {
1316         self.path == other.path && self.delimiter == other.delimiter
1317             && TokenStreamHelper(&self.tokens) == TokenStreamHelper(&other.tokens)
1318     }
1319 }
1320 #[cfg(any(feature = "derive", feature = "full"))]
1321 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1322 impl Eq for MacroDelimiter {}
1323 #[cfg(any(feature = "derive", feature = "full"))]
1324 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1325 impl PartialEq for MacroDelimiter {
eq(&self, other: &Self) -> bool1326     fn eq(&self, other: &Self) -> bool {
1327         match (self, other) {
1328             (MacroDelimiter::Paren(_), MacroDelimiter::Paren(_)) => true,
1329             (MacroDelimiter::Brace(_), MacroDelimiter::Brace(_)) => true,
1330             (MacroDelimiter::Bracket(_), MacroDelimiter::Bracket(_)) => true,
1331             _ => false,
1332         }
1333     }
1334 }
1335 #[cfg(any(feature = "derive", feature = "full"))]
1336 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1337 impl Eq for Meta {}
1338 #[cfg(any(feature = "derive", feature = "full"))]
1339 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1340 impl PartialEq for Meta {
eq(&self, other: &Self) -> bool1341     fn eq(&self, other: &Self) -> bool {
1342         match (self, other) {
1343             (Meta::Path(self0), Meta::Path(other0)) => self0 == other0,
1344             (Meta::List(self0), Meta::List(other0)) => self0 == other0,
1345             (Meta::NameValue(self0), Meta::NameValue(other0)) => self0 == other0,
1346             _ => false,
1347         }
1348     }
1349 }
1350 #[cfg(any(feature = "derive", feature = "full"))]
1351 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1352 impl Eq for MetaList {}
1353 #[cfg(any(feature = "derive", feature = "full"))]
1354 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1355 impl PartialEq for MetaList {
eq(&self, other: &Self) -> bool1356     fn eq(&self, other: &Self) -> bool {
1357         self.path == other.path && self.delimiter == other.delimiter
1358             && TokenStreamHelper(&self.tokens) == TokenStreamHelper(&other.tokens)
1359     }
1360 }
1361 #[cfg(any(feature = "derive", feature = "full"))]
1362 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1363 impl Eq for MetaNameValue {}
1364 #[cfg(any(feature = "derive", feature = "full"))]
1365 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1366 impl PartialEq for MetaNameValue {
eq(&self, other: &Self) -> bool1367     fn eq(&self, other: &Self) -> bool {
1368         self.path == other.path && self.value == other.value
1369     }
1370 }
1371 #[cfg(any(feature = "derive", feature = "full"))]
1372 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1373 impl Eq for ParenthesizedGenericArguments {}
1374 #[cfg(any(feature = "derive", feature = "full"))]
1375 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1376 impl PartialEq for ParenthesizedGenericArguments {
eq(&self, other: &Self) -> bool1377     fn eq(&self, other: &Self) -> bool {
1378         self.inputs == other.inputs && self.output == other.output
1379     }
1380 }
1381 #[cfg(feature = "full")]
1382 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1383 impl Eq for Pat {}
1384 #[cfg(feature = "full")]
1385 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1386 impl PartialEq for Pat {
eq(&self, other: &Self) -> bool1387     fn eq(&self, other: &Self) -> bool {
1388         match (self, other) {
1389             (Pat::Const(self0), Pat::Const(other0)) => self0 == other0,
1390             (Pat::Ident(self0), Pat::Ident(other0)) => self0 == other0,
1391             (Pat::Lit(self0), Pat::Lit(other0)) => self0 == other0,
1392             (Pat::Macro(self0), Pat::Macro(other0)) => self0 == other0,
1393             (Pat::Or(self0), Pat::Or(other0)) => self0 == other0,
1394             (Pat::Paren(self0), Pat::Paren(other0)) => self0 == other0,
1395             (Pat::Path(self0), Pat::Path(other0)) => self0 == other0,
1396             (Pat::Range(self0), Pat::Range(other0)) => self0 == other0,
1397             (Pat::Reference(self0), Pat::Reference(other0)) => self0 == other0,
1398             (Pat::Rest(self0), Pat::Rest(other0)) => self0 == other0,
1399             (Pat::Slice(self0), Pat::Slice(other0)) => self0 == other0,
1400             (Pat::Struct(self0), Pat::Struct(other0)) => self0 == other0,
1401             (Pat::Tuple(self0), Pat::Tuple(other0)) => self0 == other0,
1402             (Pat::TupleStruct(self0), Pat::TupleStruct(other0)) => self0 == other0,
1403             (Pat::Type(self0), Pat::Type(other0)) => self0 == other0,
1404             (Pat::Verbatim(self0), Pat::Verbatim(other0)) => {
1405                 TokenStreamHelper(self0) == TokenStreamHelper(other0)
1406             }
1407             (Pat::Wild(self0), Pat::Wild(other0)) => self0 == other0,
1408             _ => false,
1409         }
1410     }
1411 }
1412 #[cfg(feature = "full")]
1413 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1414 impl Eq for PatIdent {}
1415 #[cfg(feature = "full")]
1416 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1417 impl PartialEq for PatIdent {
eq(&self, other: &Self) -> bool1418     fn eq(&self, other: &Self) -> bool {
1419         self.attrs == other.attrs && self.by_ref == other.by_ref
1420             && self.mutability == other.mutability && self.ident == other.ident
1421             && self.subpat == other.subpat
1422     }
1423 }
1424 #[cfg(feature = "full")]
1425 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1426 impl Eq for PatOr {}
1427 #[cfg(feature = "full")]
1428 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1429 impl PartialEq for PatOr {
eq(&self, other: &Self) -> bool1430     fn eq(&self, other: &Self) -> bool {
1431         self.attrs == other.attrs && self.leading_vert == other.leading_vert
1432             && self.cases == other.cases
1433     }
1434 }
1435 #[cfg(feature = "full")]
1436 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1437 impl Eq for PatParen {}
1438 #[cfg(feature = "full")]
1439 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1440 impl PartialEq for PatParen {
eq(&self, other: &Self) -> bool1441     fn eq(&self, other: &Self) -> bool {
1442         self.attrs == other.attrs && self.pat == other.pat
1443     }
1444 }
1445 #[cfg(feature = "full")]
1446 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1447 impl Eq for PatReference {}
1448 #[cfg(feature = "full")]
1449 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1450 impl PartialEq for PatReference {
eq(&self, other: &Self) -> bool1451     fn eq(&self, other: &Self) -> bool {
1452         self.attrs == other.attrs && self.mutability == other.mutability
1453             && self.pat == other.pat
1454     }
1455 }
1456 #[cfg(feature = "full")]
1457 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1458 impl Eq for PatRest {}
1459 #[cfg(feature = "full")]
1460 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1461 impl PartialEq for PatRest {
eq(&self, other: &Self) -> bool1462     fn eq(&self, other: &Self) -> bool {
1463         self.attrs == other.attrs
1464     }
1465 }
1466 #[cfg(feature = "full")]
1467 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1468 impl Eq for PatSlice {}
1469 #[cfg(feature = "full")]
1470 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1471 impl PartialEq for PatSlice {
eq(&self, other: &Self) -> bool1472     fn eq(&self, other: &Self) -> bool {
1473         self.attrs == other.attrs && self.elems == other.elems
1474     }
1475 }
1476 #[cfg(feature = "full")]
1477 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1478 impl Eq for PatStruct {}
1479 #[cfg(feature = "full")]
1480 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1481 impl PartialEq for PatStruct {
eq(&self, other: &Self) -> bool1482     fn eq(&self, other: &Self) -> bool {
1483         self.attrs == other.attrs && self.qself == other.qself && self.path == other.path
1484             && self.fields == other.fields && self.rest == other.rest
1485     }
1486 }
1487 #[cfg(feature = "full")]
1488 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1489 impl Eq for PatTuple {}
1490 #[cfg(feature = "full")]
1491 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1492 impl PartialEq for PatTuple {
eq(&self, other: &Self) -> bool1493     fn eq(&self, other: &Self) -> bool {
1494         self.attrs == other.attrs && self.elems == other.elems
1495     }
1496 }
1497 #[cfg(feature = "full")]
1498 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1499 impl Eq for PatTupleStruct {}
1500 #[cfg(feature = "full")]
1501 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1502 impl PartialEq for PatTupleStruct {
eq(&self, other: &Self) -> bool1503     fn eq(&self, other: &Self) -> bool {
1504         self.attrs == other.attrs && self.qself == other.qself && self.path == other.path
1505             && self.elems == other.elems
1506     }
1507 }
1508 #[cfg(feature = "full")]
1509 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1510 impl Eq for PatType {}
1511 #[cfg(feature = "full")]
1512 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1513 impl PartialEq for PatType {
eq(&self, other: &Self) -> bool1514     fn eq(&self, other: &Self) -> bool {
1515         self.attrs == other.attrs && self.pat == other.pat && self.ty == other.ty
1516     }
1517 }
1518 #[cfg(feature = "full")]
1519 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1520 impl Eq for PatWild {}
1521 #[cfg(feature = "full")]
1522 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1523 impl PartialEq for PatWild {
eq(&self, other: &Self) -> bool1524     fn eq(&self, other: &Self) -> bool {
1525         self.attrs == other.attrs
1526     }
1527 }
1528 #[cfg(any(feature = "derive", feature = "full"))]
1529 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1530 impl Eq for Path {}
1531 #[cfg(any(feature = "derive", feature = "full"))]
1532 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1533 impl PartialEq for Path {
eq(&self, other: &Self) -> bool1534     fn eq(&self, other: &Self) -> bool {
1535         self.leading_colon == other.leading_colon && self.segments == other.segments
1536     }
1537 }
1538 #[cfg(any(feature = "derive", feature = "full"))]
1539 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1540 impl Eq for PathArguments {}
1541 #[cfg(any(feature = "derive", feature = "full"))]
1542 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1543 impl PartialEq for PathArguments {
eq(&self, other: &Self) -> bool1544     fn eq(&self, other: &Self) -> bool {
1545         match (self, other) {
1546             (PathArguments::None, PathArguments::None) => true,
1547             (
1548                 PathArguments::AngleBracketed(self0),
1549                 PathArguments::AngleBracketed(other0),
1550             ) => self0 == other0,
1551             (
1552                 PathArguments::Parenthesized(self0),
1553                 PathArguments::Parenthesized(other0),
1554             ) => self0 == other0,
1555             _ => false,
1556         }
1557     }
1558 }
1559 #[cfg(any(feature = "derive", feature = "full"))]
1560 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1561 impl Eq for PathSegment {}
1562 #[cfg(any(feature = "derive", feature = "full"))]
1563 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1564 impl PartialEq for PathSegment {
eq(&self, other: &Self) -> bool1565     fn eq(&self, other: &Self) -> bool {
1566         self.ident == other.ident && self.arguments == other.arguments
1567     }
1568 }
1569 #[cfg(any(feature = "derive", feature = "full"))]
1570 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1571 impl Eq for PredicateLifetime {}
1572 #[cfg(any(feature = "derive", feature = "full"))]
1573 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1574 impl PartialEq for PredicateLifetime {
eq(&self, other: &Self) -> bool1575     fn eq(&self, other: &Self) -> bool {
1576         self.lifetime == other.lifetime && self.bounds == other.bounds
1577     }
1578 }
1579 #[cfg(any(feature = "derive", feature = "full"))]
1580 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1581 impl Eq for PredicateType {}
1582 #[cfg(any(feature = "derive", feature = "full"))]
1583 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1584 impl PartialEq for PredicateType {
eq(&self, other: &Self) -> bool1585     fn eq(&self, other: &Self) -> bool {
1586         self.lifetimes == other.lifetimes && self.bounded_ty == other.bounded_ty
1587             && self.bounds == other.bounds
1588     }
1589 }
1590 #[cfg(any(feature = "derive", feature = "full"))]
1591 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1592 impl Eq for QSelf {}
1593 #[cfg(any(feature = "derive", feature = "full"))]
1594 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1595 impl PartialEq for QSelf {
eq(&self, other: &Self) -> bool1596     fn eq(&self, other: &Self) -> bool {
1597         self.ty == other.ty && self.position == other.position
1598             && self.as_token == other.as_token
1599     }
1600 }
1601 #[cfg(feature = "full")]
1602 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1603 impl Eq for RangeLimits {}
1604 #[cfg(feature = "full")]
1605 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1606 impl PartialEq for RangeLimits {
eq(&self, other: &Self) -> bool1607     fn eq(&self, other: &Self) -> bool {
1608         match (self, other) {
1609             (RangeLimits::HalfOpen(_), RangeLimits::HalfOpen(_)) => true,
1610             (RangeLimits::Closed(_), RangeLimits::Closed(_)) => true,
1611             _ => false,
1612         }
1613     }
1614 }
1615 #[cfg(feature = "full")]
1616 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1617 impl Eq for Receiver {}
1618 #[cfg(feature = "full")]
1619 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1620 impl PartialEq for Receiver {
eq(&self, other: &Self) -> bool1621     fn eq(&self, other: &Self) -> bool {
1622         self.attrs == other.attrs && self.reference == other.reference
1623             && self.mutability == other.mutability
1624             && self.colon_token == other.colon_token && self.ty == other.ty
1625     }
1626 }
1627 #[cfg(any(feature = "derive", feature = "full"))]
1628 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1629 impl Eq for ReturnType {}
1630 #[cfg(any(feature = "derive", feature = "full"))]
1631 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1632 impl PartialEq for ReturnType {
eq(&self, other: &Self) -> bool1633     fn eq(&self, other: &Self) -> bool {
1634         match (self, other) {
1635             (ReturnType::Default, ReturnType::Default) => true,
1636             (ReturnType::Type(_, self1), ReturnType::Type(_, other1)) => self1 == other1,
1637             _ => false,
1638         }
1639     }
1640 }
1641 #[cfg(feature = "full")]
1642 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1643 impl Eq for Signature {}
1644 #[cfg(feature = "full")]
1645 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1646 impl PartialEq for Signature {
eq(&self, other: &Self) -> bool1647     fn eq(&self, other: &Self) -> bool {
1648         self.constness == other.constness && self.asyncness == other.asyncness
1649             && self.unsafety == other.unsafety && self.abi == other.abi
1650             && self.ident == other.ident && self.generics == other.generics
1651             && self.inputs == other.inputs && self.variadic == other.variadic
1652             && self.output == other.output
1653     }
1654 }
1655 #[cfg(feature = "full")]
1656 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1657 impl Eq for StaticMutability {}
1658 #[cfg(feature = "full")]
1659 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1660 impl PartialEq for StaticMutability {
eq(&self, other: &Self) -> bool1661     fn eq(&self, other: &Self) -> bool {
1662         match (self, other) {
1663             (StaticMutability::Mut(_), StaticMutability::Mut(_)) => true,
1664             (StaticMutability::None, StaticMutability::None) => true,
1665             _ => false,
1666         }
1667     }
1668 }
1669 #[cfg(feature = "full")]
1670 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1671 impl Eq for Stmt {}
1672 #[cfg(feature = "full")]
1673 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1674 impl PartialEq for Stmt {
eq(&self, other: &Self) -> bool1675     fn eq(&self, other: &Self) -> bool {
1676         match (self, other) {
1677             (Stmt::Local(self0), Stmt::Local(other0)) => self0 == other0,
1678             (Stmt::Item(self0), Stmt::Item(other0)) => self0 == other0,
1679             (Stmt::Expr(self0, self1), Stmt::Expr(other0, other1)) => {
1680                 self0 == other0 && self1 == other1
1681             }
1682             (Stmt::Macro(self0), Stmt::Macro(other0)) => self0 == other0,
1683             _ => false,
1684         }
1685     }
1686 }
1687 #[cfg(feature = "full")]
1688 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1689 impl Eq for StmtMacro {}
1690 #[cfg(feature = "full")]
1691 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1692 impl PartialEq for StmtMacro {
eq(&self, other: &Self) -> bool1693     fn eq(&self, other: &Self) -> bool {
1694         self.attrs == other.attrs && self.mac == other.mac
1695             && self.semi_token == other.semi_token
1696     }
1697 }
1698 #[cfg(any(feature = "derive", feature = "full"))]
1699 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1700 impl Eq for TraitBound {}
1701 #[cfg(any(feature = "derive", feature = "full"))]
1702 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1703 impl PartialEq for TraitBound {
eq(&self, other: &Self) -> bool1704     fn eq(&self, other: &Self) -> bool {
1705         self.paren_token == other.paren_token && self.modifier == other.modifier
1706             && self.lifetimes == other.lifetimes && self.path == other.path
1707     }
1708 }
1709 #[cfg(any(feature = "derive", feature = "full"))]
1710 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1711 impl Eq for TraitBoundModifier {}
1712 #[cfg(any(feature = "derive", feature = "full"))]
1713 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1714 impl PartialEq for TraitBoundModifier {
eq(&self, other: &Self) -> bool1715     fn eq(&self, other: &Self) -> bool {
1716         match (self, other) {
1717             (TraitBoundModifier::None, TraitBoundModifier::None) => true,
1718             (TraitBoundModifier::Maybe(_), TraitBoundModifier::Maybe(_)) => true,
1719             _ => false,
1720         }
1721     }
1722 }
1723 #[cfg(feature = "full")]
1724 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1725 impl Eq for TraitItem {}
1726 #[cfg(feature = "full")]
1727 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1728 impl PartialEq for TraitItem {
eq(&self, other: &Self) -> bool1729     fn eq(&self, other: &Self) -> bool {
1730         match (self, other) {
1731             (TraitItem::Const(self0), TraitItem::Const(other0)) => self0 == other0,
1732             (TraitItem::Fn(self0), TraitItem::Fn(other0)) => self0 == other0,
1733             (TraitItem::Type(self0), TraitItem::Type(other0)) => self0 == other0,
1734             (TraitItem::Macro(self0), TraitItem::Macro(other0)) => self0 == other0,
1735             (TraitItem::Verbatim(self0), TraitItem::Verbatim(other0)) => {
1736                 TokenStreamHelper(self0) == TokenStreamHelper(other0)
1737             }
1738             _ => false,
1739         }
1740     }
1741 }
1742 #[cfg(feature = "full")]
1743 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1744 impl Eq for TraitItemConst {}
1745 #[cfg(feature = "full")]
1746 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1747 impl PartialEq for TraitItemConst {
eq(&self, other: &Self) -> bool1748     fn eq(&self, other: &Self) -> bool {
1749         self.attrs == other.attrs && self.ident == other.ident
1750             && self.generics == other.generics && self.ty == other.ty
1751             && self.default == other.default
1752     }
1753 }
1754 #[cfg(feature = "full")]
1755 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1756 impl Eq for TraitItemFn {}
1757 #[cfg(feature = "full")]
1758 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1759 impl PartialEq for TraitItemFn {
eq(&self, other: &Self) -> bool1760     fn eq(&self, other: &Self) -> bool {
1761         self.attrs == other.attrs && self.sig == other.sig
1762             && self.default == other.default && self.semi_token == other.semi_token
1763     }
1764 }
1765 #[cfg(feature = "full")]
1766 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1767 impl Eq for TraitItemMacro {}
1768 #[cfg(feature = "full")]
1769 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1770 impl PartialEq for TraitItemMacro {
eq(&self, other: &Self) -> bool1771     fn eq(&self, other: &Self) -> bool {
1772         self.attrs == other.attrs && self.mac == other.mac
1773             && self.semi_token == other.semi_token
1774     }
1775 }
1776 #[cfg(feature = "full")]
1777 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1778 impl Eq for TraitItemType {}
1779 #[cfg(feature = "full")]
1780 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1781 impl PartialEq for TraitItemType {
eq(&self, other: &Self) -> bool1782     fn eq(&self, other: &Self) -> bool {
1783         self.attrs == other.attrs && self.ident == other.ident
1784             && self.generics == other.generics && self.colon_token == other.colon_token
1785             && self.bounds == other.bounds && self.default == other.default
1786     }
1787 }
1788 #[cfg(any(feature = "derive", feature = "full"))]
1789 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1790 impl Eq for Type {}
1791 #[cfg(any(feature = "derive", feature = "full"))]
1792 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1793 impl PartialEq for Type {
eq(&self, other: &Self) -> bool1794     fn eq(&self, other: &Self) -> bool {
1795         match (self, other) {
1796             (Type::Array(self0), Type::Array(other0)) => self0 == other0,
1797             (Type::BareFn(self0), Type::BareFn(other0)) => self0 == other0,
1798             (Type::Group(self0), Type::Group(other0)) => self0 == other0,
1799             (Type::ImplTrait(self0), Type::ImplTrait(other0)) => self0 == other0,
1800             (Type::Infer(self0), Type::Infer(other0)) => self0 == other0,
1801             (Type::Macro(self0), Type::Macro(other0)) => self0 == other0,
1802             (Type::Never(self0), Type::Never(other0)) => self0 == other0,
1803             (Type::Paren(self0), Type::Paren(other0)) => self0 == other0,
1804             (Type::Path(self0), Type::Path(other0)) => self0 == other0,
1805             (Type::Ptr(self0), Type::Ptr(other0)) => self0 == other0,
1806             (Type::Reference(self0), Type::Reference(other0)) => self0 == other0,
1807             (Type::Slice(self0), Type::Slice(other0)) => self0 == other0,
1808             (Type::TraitObject(self0), Type::TraitObject(other0)) => self0 == other0,
1809             (Type::Tuple(self0), Type::Tuple(other0)) => self0 == other0,
1810             (Type::Verbatim(self0), Type::Verbatim(other0)) => {
1811                 TokenStreamHelper(self0) == TokenStreamHelper(other0)
1812             }
1813             _ => false,
1814         }
1815     }
1816 }
1817 #[cfg(any(feature = "derive", feature = "full"))]
1818 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1819 impl Eq for TypeArray {}
1820 #[cfg(any(feature = "derive", feature = "full"))]
1821 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1822 impl PartialEq for TypeArray {
eq(&self, other: &Self) -> bool1823     fn eq(&self, other: &Self) -> bool {
1824         self.elem == other.elem && self.len == other.len
1825     }
1826 }
1827 #[cfg(any(feature = "derive", feature = "full"))]
1828 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1829 impl Eq for TypeBareFn {}
1830 #[cfg(any(feature = "derive", feature = "full"))]
1831 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1832 impl PartialEq for TypeBareFn {
eq(&self, other: &Self) -> bool1833     fn eq(&self, other: &Self) -> bool {
1834         self.lifetimes == other.lifetimes && self.unsafety == other.unsafety
1835             && self.abi == other.abi && self.inputs == other.inputs
1836             && self.variadic == other.variadic && self.output == other.output
1837     }
1838 }
1839 #[cfg(any(feature = "derive", feature = "full"))]
1840 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1841 impl Eq for TypeGroup {}
1842 #[cfg(any(feature = "derive", feature = "full"))]
1843 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1844 impl PartialEq for TypeGroup {
eq(&self, other: &Self) -> bool1845     fn eq(&self, other: &Self) -> bool {
1846         self.elem == other.elem
1847     }
1848 }
1849 #[cfg(any(feature = "derive", feature = "full"))]
1850 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1851 impl Eq for TypeImplTrait {}
1852 #[cfg(any(feature = "derive", feature = "full"))]
1853 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1854 impl PartialEq for TypeImplTrait {
eq(&self, other: &Self) -> bool1855     fn eq(&self, other: &Self) -> bool {
1856         self.bounds == other.bounds
1857     }
1858 }
1859 #[cfg(any(feature = "derive", feature = "full"))]
1860 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1861 impl Eq for TypeInfer {}
1862 #[cfg(any(feature = "derive", feature = "full"))]
1863 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1864 impl PartialEq for TypeInfer {
eq(&self, _other: &Self) -> bool1865     fn eq(&self, _other: &Self) -> bool {
1866         true
1867     }
1868 }
1869 #[cfg(any(feature = "derive", feature = "full"))]
1870 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1871 impl Eq for TypeMacro {}
1872 #[cfg(any(feature = "derive", feature = "full"))]
1873 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1874 impl PartialEq for TypeMacro {
eq(&self, other: &Self) -> bool1875     fn eq(&self, other: &Self) -> bool {
1876         self.mac == other.mac
1877     }
1878 }
1879 #[cfg(any(feature = "derive", feature = "full"))]
1880 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1881 impl Eq for TypeNever {}
1882 #[cfg(any(feature = "derive", feature = "full"))]
1883 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1884 impl PartialEq for TypeNever {
eq(&self, _other: &Self) -> bool1885     fn eq(&self, _other: &Self) -> bool {
1886         true
1887     }
1888 }
1889 #[cfg(any(feature = "derive", feature = "full"))]
1890 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1891 impl Eq for TypeParam {}
1892 #[cfg(any(feature = "derive", feature = "full"))]
1893 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1894 impl PartialEq for TypeParam {
eq(&self, other: &Self) -> bool1895     fn eq(&self, other: &Self) -> bool {
1896         self.attrs == other.attrs && self.ident == other.ident
1897             && self.colon_token == other.colon_token && self.bounds == other.bounds
1898             && self.eq_token == other.eq_token && self.default == other.default
1899     }
1900 }
1901 #[cfg(any(feature = "derive", feature = "full"))]
1902 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1903 impl Eq for TypeParamBound {}
1904 #[cfg(any(feature = "derive", feature = "full"))]
1905 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1906 impl PartialEq for TypeParamBound {
eq(&self, other: &Self) -> bool1907     fn eq(&self, other: &Self) -> bool {
1908         match (self, other) {
1909             (TypeParamBound::Trait(self0), TypeParamBound::Trait(other0)) => {
1910                 self0 == other0
1911             }
1912             (TypeParamBound::Lifetime(self0), TypeParamBound::Lifetime(other0)) => {
1913                 self0 == other0
1914             }
1915             (TypeParamBound::Verbatim(self0), TypeParamBound::Verbatim(other0)) => {
1916                 TokenStreamHelper(self0) == TokenStreamHelper(other0)
1917             }
1918             _ => false,
1919         }
1920     }
1921 }
1922 #[cfg(any(feature = "derive", feature = "full"))]
1923 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1924 impl Eq for TypeParen {}
1925 #[cfg(any(feature = "derive", feature = "full"))]
1926 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1927 impl PartialEq for TypeParen {
eq(&self, other: &Self) -> bool1928     fn eq(&self, other: &Self) -> bool {
1929         self.elem == other.elem
1930     }
1931 }
1932 #[cfg(any(feature = "derive", feature = "full"))]
1933 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1934 impl Eq for TypePath {}
1935 #[cfg(any(feature = "derive", feature = "full"))]
1936 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1937 impl PartialEq for TypePath {
eq(&self, other: &Self) -> bool1938     fn eq(&self, other: &Self) -> bool {
1939         self.qself == other.qself && self.path == other.path
1940     }
1941 }
1942 #[cfg(any(feature = "derive", feature = "full"))]
1943 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1944 impl Eq for TypePtr {}
1945 #[cfg(any(feature = "derive", feature = "full"))]
1946 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1947 impl PartialEq for TypePtr {
eq(&self, other: &Self) -> bool1948     fn eq(&self, other: &Self) -> bool {
1949         self.const_token == other.const_token && self.mutability == other.mutability
1950             && self.elem == other.elem
1951     }
1952 }
1953 #[cfg(any(feature = "derive", feature = "full"))]
1954 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1955 impl Eq for TypeReference {}
1956 #[cfg(any(feature = "derive", feature = "full"))]
1957 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1958 impl PartialEq for TypeReference {
eq(&self, other: &Self) -> bool1959     fn eq(&self, other: &Self) -> bool {
1960         self.lifetime == other.lifetime && self.mutability == other.mutability
1961             && self.elem == other.elem
1962     }
1963 }
1964 #[cfg(any(feature = "derive", feature = "full"))]
1965 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1966 impl Eq for TypeSlice {}
1967 #[cfg(any(feature = "derive", feature = "full"))]
1968 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1969 impl PartialEq for TypeSlice {
eq(&self, other: &Self) -> bool1970     fn eq(&self, other: &Self) -> bool {
1971         self.elem == other.elem
1972     }
1973 }
1974 #[cfg(any(feature = "derive", feature = "full"))]
1975 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1976 impl Eq for TypeTraitObject {}
1977 #[cfg(any(feature = "derive", feature = "full"))]
1978 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1979 impl PartialEq for TypeTraitObject {
eq(&self, other: &Self) -> bool1980     fn eq(&self, other: &Self) -> bool {
1981         self.dyn_token == other.dyn_token && self.bounds == other.bounds
1982     }
1983 }
1984 #[cfg(any(feature = "derive", feature = "full"))]
1985 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1986 impl Eq for TypeTuple {}
1987 #[cfg(any(feature = "derive", feature = "full"))]
1988 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1989 impl PartialEq for TypeTuple {
eq(&self, other: &Self) -> bool1990     fn eq(&self, other: &Self) -> bool {
1991         self.elems == other.elems
1992     }
1993 }
1994 #[cfg(any(feature = "derive", feature = "full"))]
1995 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1996 impl Eq for UnOp {}
1997 #[cfg(any(feature = "derive", feature = "full"))]
1998 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1999 impl PartialEq for UnOp {
eq(&self, other: &Self) -> bool2000     fn eq(&self, other: &Self) -> bool {
2001         match (self, other) {
2002             (UnOp::Deref(_), UnOp::Deref(_)) => true,
2003             (UnOp::Not(_), UnOp::Not(_)) => true,
2004             (UnOp::Neg(_), UnOp::Neg(_)) => true,
2005             _ => false,
2006         }
2007     }
2008 }
2009 #[cfg(feature = "full")]
2010 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2011 impl Eq for UseGlob {}
2012 #[cfg(feature = "full")]
2013 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2014 impl PartialEq for UseGlob {
eq(&self, _other: &Self) -> bool2015     fn eq(&self, _other: &Self) -> bool {
2016         true
2017     }
2018 }
2019 #[cfg(feature = "full")]
2020 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2021 impl Eq for UseGroup {}
2022 #[cfg(feature = "full")]
2023 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2024 impl PartialEq for UseGroup {
eq(&self, other: &Self) -> bool2025     fn eq(&self, other: &Self) -> bool {
2026         self.items == other.items
2027     }
2028 }
2029 #[cfg(feature = "full")]
2030 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2031 impl Eq for UseName {}
2032 #[cfg(feature = "full")]
2033 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2034 impl PartialEq for UseName {
eq(&self, other: &Self) -> bool2035     fn eq(&self, other: &Self) -> bool {
2036         self.ident == other.ident
2037     }
2038 }
2039 #[cfg(feature = "full")]
2040 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2041 impl Eq for UsePath {}
2042 #[cfg(feature = "full")]
2043 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2044 impl PartialEq for UsePath {
eq(&self, other: &Self) -> bool2045     fn eq(&self, other: &Self) -> bool {
2046         self.ident == other.ident && self.tree == other.tree
2047     }
2048 }
2049 #[cfg(feature = "full")]
2050 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2051 impl Eq for UseRename {}
2052 #[cfg(feature = "full")]
2053 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2054 impl PartialEq for UseRename {
eq(&self, other: &Self) -> bool2055     fn eq(&self, other: &Self) -> bool {
2056         self.ident == other.ident && self.rename == other.rename
2057     }
2058 }
2059 #[cfg(feature = "full")]
2060 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2061 impl Eq for UseTree {}
2062 #[cfg(feature = "full")]
2063 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2064 impl PartialEq for UseTree {
eq(&self, other: &Self) -> bool2065     fn eq(&self, other: &Self) -> bool {
2066         match (self, other) {
2067             (UseTree::Path(self0), UseTree::Path(other0)) => self0 == other0,
2068             (UseTree::Name(self0), UseTree::Name(other0)) => self0 == other0,
2069             (UseTree::Rename(self0), UseTree::Rename(other0)) => self0 == other0,
2070             (UseTree::Glob(self0), UseTree::Glob(other0)) => self0 == other0,
2071             (UseTree::Group(self0), UseTree::Group(other0)) => self0 == other0,
2072             _ => false,
2073         }
2074     }
2075 }
2076 #[cfg(feature = "full")]
2077 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2078 impl Eq for Variadic {}
2079 #[cfg(feature = "full")]
2080 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2081 impl PartialEq for Variadic {
eq(&self, other: &Self) -> bool2082     fn eq(&self, other: &Self) -> bool {
2083         self.attrs == other.attrs && self.pat == other.pat && self.comma == other.comma
2084     }
2085 }
2086 #[cfg(any(feature = "derive", feature = "full"))]
2087 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2088 impl Eq for Variant {}
2089 #[cfg(any(feature = "derive", feature = "full"))]
2090 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2091 impl PartialEq for Variant {
eq(&self, other: &Self) -> bool2092     fn eq(&self, other: &Self) -> bool {
2093         self.attrs == other.attrs && self.ident == other.ident
2094             && self.fields == other.fields && self.discriminant == other.discriminant
2095     }
2096 }
2097 #[cfg(any(feature = "derive", feature = "full"))]
2098 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2099 impl Eq for VisRestricted {}
2100 #[cfg(any(feature = "derive", feature = "full"))]
2101 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2102 impl PartialEq for VisRestricted {
eq(&self, other: &Self) -> bool2103     fn eq(&self, other: &Self) -> bool {
2104         self.in_token == other.in_token && self.path == other.path
2105     }
2106 }
2107 #[cfg(any(feature = "derive", feature = "full"))]
2108 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2109 impl Eq for Visibility {}
2110 #[cfg(any(feature = "derive", feature = "full"))]
2111 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2112 impl PartialEq for Visibility {
eq(&self, other: &Self) -> bool2113     fn eq(&self, other: &Self) -> bool {
2114         match (self, other) {
2115             (Visibility::Public(_), Visibility::Public(_)) => true,
2116             (Visibility::Restricted(self0), Visibility::Restricted(other0)) => {
2117                 self0 == other0
2118             }
2119             (Visibility::Inherited, Visibility::Inherited) => true,
2120             _ => false,
2121         }
2122     }
2123 }
2124 #[cfg(any(feature = "derive", feature = "full"))]
2125 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2126 impl Eq for WhereClause {}
2127 #[cfg(any(feature = "derive", feature = "full"))]
2128 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2129 impl PartialEq for WhereClause {
eq(&self, other: &Self) -> bool2130     fn eq(&self, other: &Self) -> bool {
2131         self.predicates == other.predicates
2132     }
2133 }
2134 #[cfg(any(feature = "derive", feature = "full"))]
2135 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2136 impl Eq for WherePredicate {}
2137 #[cfg(any(feature = "derive", feature = "full"))]
2138 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2139 impl PartialEq for WherePredicate {
eq(&self, other: &Self) -> bool2140     fn eq(&self, other: &Self) -> bool {
2141         match (self, other) {
2142             (WherePredicate::Lifetime(self0), WherePredicate::Lifetime(other0)) => {
2143                 self0 == other0
2144             }
2145             (WherePredicate::Type(self0), WherePredicate::Type(other0)) => {
2146                 self0 == other0
2147             }
2148             _ => false,
2149         }
2150     }
2151 }
2152