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"))]
5use crate::tt::TokenStreamHelper;
6use crate::*;
7#[cfg(any(feature = "derive", feature = "full"))]
8#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
9impl Eq for Abi {}
10#[cfg(any(feature = "derive", feature = "full"))]
11#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
12impl PartialEq for Abi {
13 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")))]
19impl Eq for AngleBracketedGenericArguments {}
20#[cfg(any(feature = "derive", feature = "full"))]
21#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
22impl PartialEq for AngleBracketedGenericArguments {
23 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")))]
29impl Eq for Arm {}
30#[cfg(feature = "full")]
31#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
32impl PartialEq for Arm {
33 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")))]
40impl Eq for AssocConst {}
41#[cfg(any(feature = "derive", feature = "full"))]
42#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
43impl PartialEq for AssocConst {
44 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")))]
51impl Eq for AssocType {}
52#[cfg(any(feature = "derive", feature = "full"))]
53#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
54impl PartialEq for AssocType {
55 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")))]
62impl Eq for AttrStyle {}
63#[cfg(any(feature = "derive", feature = "full"))]
64#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
65impl PartialEq for AttrStyle {
66 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")))]
76impl Eq for Attribute {}
77#[cfg(any(feature = "derive", feature = "full"))]
78#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
79impl PartialEq for Attribute {
80 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")))]
86impl Eq for BareFnArg {}
87#[cfg(any(feature = "derive", feature = "full"))]
88#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
89impl PartialEq for BareFnArg {
90 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")))]
96impl Eq for BareVariadic {}
97#[cfg(any(feature = "derive", feature = "full"))]
98#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
99impl PartialEq for BareVariadic {
100 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")))]
106impl Eq for BinOp {}
107#[cfg(any(feature = "derive", feature = "full"))]
108#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
109impl PartialEq for BinOp {
110 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")))]
146impl Eq for Block {}
147#[cfg(feature = "full")]
148#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
149impl PartialEq for Block {
150 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")))]
156impl Eq for BoundLifetimes {}
157#[cfg(any(feature = "derive", feature = "full"))]
158#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
159impl PartialEq for BoundLifetimes {
160 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")))]
166impl Eq for ConstParam {}
167#[cfg(any(feature = "derive", feature = "full"))]
168#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
169impl PartialEq for ConstParam {
170 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")))]
177impl Eq for Constraint {}
178#[cfg(any(feature = "derive", feature = "full"))]
179#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
180impl PartialEq for Constraint {
181 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")))]
188impl Eq for Data {}
189#[cfg(feature = "derive")]
190#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
191impl PartialEq for Data {
192 fn eq(&self, other: &Self) -> bool {
193 match (self, other) {
194 (Data::Struct(self0: &DataStruct), Data::Struct(other0: &DataStruct)) => self0 == other0,
195 (Data::Enum(self0: &DataEnum), Data::Enum(other0: &DataEnum)) => self0 == other0,
196 (Data::Union(self0: &DataUnion), Data::Union(other0: &DataUnion)) => self0 == other0,
197 _ => false,
198 }
199 }
200}
201#[cfg(feature = "derive")]
202#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
203impl Eq for DataEnum {}
204#[cfg(feature = "derive")]
205#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
206impl PartialEq for DataEnum {
207 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")))]
213impl Eq for DataStruct {}
214#[cfg(feature = "derive")]
215#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
216impl PartialEq for DataStruct {
217 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")))]
223impl Eq for DataUnion {}
224#[cfg(feature = "derive")]
225#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
226impl PartialEq for DataUnion {
227 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")))]
233impl Eq for DeriveInput {}
234#[cfg(feature = "derive")]
235#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
236impl PartialEq for DeriveInput {
237 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")))]
244impl Eq for Expr {}
245#[cfg(any(feature = "derive", feature = "full"))]
246#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
247impl PartialEq for Expr {
248 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")))]
324impl Eq for ExprArray {}
325#[cfg(feature = "full")]
326#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
327impl PartialEq for ExprArray {
328 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")))]
334impl Eq for ExprAssign {}
335#[cfg(feature = "full")]
336#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
337impl PartialEq for ExprAssign {
338 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")))]
344impl Eq for ExprAsync {}
345#[cfg(feature = "full")]
346#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
347impl PartialEq for ExprAsync {
348 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")))]
355impl Eq for ExprAwait {}
356#[cfg(feature = "full")]
357#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
358impl PartialEq for ExprAwait {
359 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")))]
365impl Eq for ExprBinary {}
366#[cfg(any(feature = "derive", feature = "full"))]
367#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
368impl PartialEq for ExprBinary {
369 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")))]
376impl Eq for ExprBlock {}
377#[cfg(feature = "full")]
378#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
379impl PartialEq for ExprBlock {
380 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")))]
387impl Eq for ExprBreak {}
388#[cfg(feature = "full")]
389#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
390impl PartialEq for ExprBreak {
391 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")))]
397impl Eq for ExprCall {}
398#[cfg(any(feature = "derive", feature = "full"))]
399#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
400impl PartialEq for ExprCall {
401 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")))]
407impl Eq for ExprCast {}
408#[cfg(any(feature = "derive", feature = "full"))]
409#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
410impl PartialEq for ExprCast {
411 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")))]
417impl Eq for ExprClosure {}
418#[cfg(feature = "full")]
419#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
420impl PartialEq for ExprClosure {
421 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")))]
431impl Eq for ExprConst {}
432#[cfg(feature = "full")]
433#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
434impl PartialEq for ExprConst {
435 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")))]
441impl Eq for ExprContinue {}
442#[cfg(feature = "full")]
443#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
444impl PartialEq for ExprContinue {
445 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")))]
451impl Eq for ExprField {}
452#[cfg(any(feature = "derive", feature = "full"))]
453#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
454impl PartialEq for ExprField {
455 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")))]
462impl Eq for ExprForLoop {}
463#[cfg(feature = "full")]
464#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
465impl PartialEq for ExprForLoop {
466 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")))]
473impl Eq for ExprGroup {}
474#[cfg(any(feature = "derive", feature = "full"))]
475#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
476impl PartialEq for ExprGroup {
477 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")))]
483impl Eq for ExprIf {}
484#[cfg(feature = "full")]
485#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
486impl PartialEq for ExprIf {
487 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")))]
495impl Eq for ExprIndex {}
496#[cfg(any(feature = "derive", feature = "full"))]
497#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
498impl PartialEq for ExprIndex {
499 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")))]
505impl Eq for ExprInfer {}
506#[cfg(feature = "full")]
507#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
508impl PartialEq for ExprInfer {
509 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")))]
515impl Eq for ExprLet {}
516#[cfg(feature = "full")]
517#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
518impl PartialEq for ExprLet {
519 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")))]
525impl Eq for ExprLit {}
526#[cfg(any(feature = "derive", feature = "full"))]
527#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
528impl PartialEq for ExprLit {
529 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")))]
535impl Eq for ExprLoop {}
536#[cfg(feature = "full")]
537#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
538impl PartialEq for ExprLoop {
539 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")))]
545impl Eq for ExprMacro {}
546#[cfg(any(feature = "derive", feature = "full"))]
547#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
548impl PartialEq for ExprMacro {
549 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")))]
555impl Eq for ExprMatch {}
556#[cfg(feature = "full")]
557#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
558impl PartialEq for ExprMatch {
559 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")))]
565impl Eq for ExprMethodCall {}
566#[cfg(feature = "full")]
567#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
568impl PartialEq for ExprMethodCall {
569 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")))]
577impl Eq for ExprParen {}
578#[cfg(any(feature = "derive", feature = "full"))]
579#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
580impl PartialEq for ExprParen {
581 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")))]
587impl Eq for ExprPath {}
588#[cfg(any(feature = "derive", feature = "full"))]
589#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
590impl PartialEq for ExprPath {
591 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")))]
597impl Eq for ExprRange {}
598#[cfg(feature = "full")]
599#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
600impl PartialEq for ExprRange {
601 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")))]
608impl Eq for ExprReference {}
609#[cfg(feature = "full")]
610#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
611impl PartialEq for ExprReference {
612 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")))]
619impl Eq for ExprRepeat {}
620#[cfg(feature = "full")]
621#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
622impl PartialEq for ExprRepeat {
623 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")))]
629impl Eq for ExprReturn {}
630#[cfg(feature = "full")]
631#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
632impl PartialEq for ExprReturn {
633 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")))]
639impl Eq for ExprStruct {}
640#[cfg(feature = "full")]
641#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
642impl PartialEq for ExprStruct {
643 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")))]
651impl Eq for ExprTry {}
652#[cfg(feature = "full")]
653#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
654impl PartialEq for ExprTry {
655 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")))]
661impl Eq for ExprTryBlock {}
662#[cfg(feature = "full")]
663#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
664impl PartialEq for ExprTryBlock {
665 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")))]
671impl Eq for ExprTuple {}
672#[cfg(feature = "full")]
673#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
674impl PartialEq for ExprTuple {
675 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")))]
681impl Eq for ExprUnary {}
682#[cfg(any(feature = "derive", feature = "full"))]
683#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
684impl PartialEq for ExprUnary {
685 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")))]
691impl Eq for ExprUnsafe {}
692#[cfg(feature = "full")]
693#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
694impl PartialEq for ExprUnsafe {
695 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")))]
701impl Eq for ExprWhile {}
702#[cfg(feature = "full")]
703#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
704impl PartialEq for ExprWhile {
705 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")))]
712impl Eq for ExprYield {}
713#[cfg(feature = "full")]
714#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
715impl PartialEq for ExprYield {
716 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")))]
722impl Eq for Field {}
723#[cfg(any(feature = "derive", feature = "full"))]
724#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
725impl PartialEq for Field {
726 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")))]
734impl Eq for FieldMutability {}
735#[cfg(any(feature = "derive", feature = "full"))]
736#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
737impl PartialEq for FieldMutability {
738 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")))]
746impl Eq for FieldPat {}
747#[cfg(feature = "full")]
748#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
749impl PartialEq for FieldPat {
750 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")))]
757impl Eq for FieldValue {}
758#[cfg(feature = "full")]
759#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
760impl PartialEq for FieldValue {
761 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")))]
768impl Eq for Fields {}
769#[cfg(any(feature = "derive", feature = "full"))]
770#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
771impl PartialEq for Fields {
772 fn eq(&self, other: &Self) -> bool {
773 match (self, other) {
774 (Fields::Named(self0: &FieldsNamed), Fields::Named(other0: &FieldsNamed)) => self0 == other0,
775 (Fields::Unnamed(self0: &FieldsUnnamed), Fields::Unnamed(other0: &FieldsUnnamed)) => 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")))]
783impl Eq for FieldsNamed {}
784#[cfg(any(feature = "derive", feature = "full"))]
785#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
786impl PartialEq for FieldsNamed {
787 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")))]
793impl Eq for FieldsUnnamed {}
794#[cfg(any(feature = "derive", feature = "full"))]
795#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
796impl PartialEq for FieldsUnnamed {
797 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")))]
803impl Eq for File {}
804#[cfg(feature = "full")]
805#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
806impl PartialEq for File {
807 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")))]
814impl Eq for FnArg {}
815#[cfg(feature = "full")]
816#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
817impl PartialEq for FnArg {
818 fn eq(&self, other: &Self) -> bool {
819 match (self, other) {
820 (FnArg::Receiver(self0: &Receiver), FnArg::Receiver(other0: &Receiver)) => self0 == other0,
821 (FnArg::Typed(self0: &PatType), FnArg::Typed(other0: &PatType)) => self0 == other0,
822 _ => false,
823 }
824 }
825}
826#[cfg(feature = "full")]
827#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
828impl Eq for ForeignItem {}
829#[cfg(feature = "full")]
830#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
831impl PartialEq for ForeignItem {
832 fn eq(&self, other: &Self) -> bool {
833 match (self, other) {
834 (ForeignItem::Fn(self0: &ForeignItemFn), ForeignItem::Fn(other0: &ForeignItemFn)) => self0 == other0,
835 (ForeignItem::Static(self0: &ForeignItemStatic), ForeignItem::Static(other0: &ForeignItemStatic)) => self0 == other0,
836 (ForeignItem::Type(self0: &ForeignItemType), ForeignItem::Type(other0: &ForeignItemType)) => self0 == other0,
837 (ForeignItem::Macro(self0: &ForeignItemMacro), ForeignItem::Macro(other0: &ForeignItemMacro)) => self0 == other0,
838 (ForeignItem::Verbatim(self0: &TokenStream), ForeignItem::Verbatim(other0: &TokenStream)) => {
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")))]
847impl Eq for ForeignItemFn {}
848#[cfg(feature = "full")]
849#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
850impl PartialEq for ForeignItemFn {
851 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")))]
857impl Eq for ForeignItemMacro {}
858#[cfg(feature = "full")]
859#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
860impl PartialEq for ForeignItemMacro {
861 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")))]
868impl Eq for ForeignItemStatic {}
869#[cfg(feature = "full")]
870#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
871impl PartialEq for ForeignItemStatic {
872 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")))]
880impl Eq for ForeignItemType {}
881#[cfg(feature = "full")]
882#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
883impl PartialEq for ForeignItemType {
884 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")))]
891impl Eq for GenericArgument {}
892#[cfg(any(feature = "derive", feature = "full"))]
893#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
894impl PartialEq for GenericArgument {
895 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")))]
921impl Eq for GenericParam {}
922#[cfg(any(feature = "derive", feature = "full"))]
923#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
924impl PartialEq for GenericParam {
925 fn eq(&self, other: &Self) -> bool {
926 match (self, other) {
927 (GenericParam::Lifetime(self0: &LifetimeParam), GenericParam::Lifetime(other0: &LifetimeParam)) => {
928 self0 == other0
929 }
930 (GenericParam::Type(self0: &TypeParam), GenericParam::Type(other0: &TypeParam)) => self0 == other0,
931 (GenericParam::Const(self0: &ConstParam), GenericParam::Const(other0: &ConstParam)) => self0 == other0,
932 _ => false,
933 }
934 }
935}
936#[cfg(any(feature = "derive", feature = "full"))]
937#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
938impl Eq for Generics {}
939#[cfg(any(feature = "derive", feature = "full"))]
940#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
941impl PartialEq for Generics {
942 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")))]
949impl Eq for ImplItem {}
950#[cfg(feature = "full")]
951#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
952impl PartialEq for ImplItem {
953 fn eq(&self, other: &Self) -> bool {
954 match (self, other) {
955 (ImplItem::Const(self0: &ImplItemConst), ImplItem::Const(other0: &ImplItemConst)) => self0 == other0,
956 (ImplItem::Fn(self0: &ImplItemFn), ImplItem::Fn(other0: &ImplItemFn)) => self0 == other0,
957 (ImplItem::Type(self0: &ImplItemType), ImplItem::Type(other0: &ImplItemType)) => self0 == other0,
958 (ImplItem::Macro(self0: &ImplItemMacro), ImplItem::Macro(other0: &ImplItemMacro)) => self0 == other0,
959 (ImplItem::Verbatim(self0: &TokenStream), ImplItem::Verbatim(other0: &TokenStream)) => {
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")))]
968impl Eq for ImplItemConst {}
969#[cfg(feature = "full")]
970#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
971impl PartialEq for ImplItemConst {
972 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")))]
981impl Eq for ImplItemFn {}
982#[cfg(feature = "full")]
983#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
984impl PartialEq for ImplItemFn {
985 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")))]
993impl Eq for ImplItemMacro {}
994#[cfg(feature = "full")]
995#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
996impl PartialEq for ImplItemMacro {
997 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")))]
1004impl Eq for ImplItemType {}
1005#[cfg(feature = "full")]
1006#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1007impl PartialEq for ImplItemType {
1008 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")))]
1016impl Eq for ImplRestriction {}
1017#[cfg(feature = "full")]
1018#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1019impl PartialEq for ImplRestriction {
1020 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")))]
1026impl Eq for Item {}
1027#[cfg(feature = "full")]
1028#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1029impl PartialEq for Item {
1030 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")))]
1056impl Eq for ItemConst {}
1057#[cfg(feature = "full")]
1058#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1059impl PartialEq for ItemConst {
1060 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")))]
1068impl Eq for ItemEnum {}
1069#[cfg(feature = "full")]
1070#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1071impl PartialEq for ItemEnum {
1072 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")))]
1079impl Eq for ItemExternCrate {}
1080#[cfg(feature = "full")]
1081#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1082impl PartialEq for ItemExternCrate {
1083 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")))]
1090impl Eq for ItemFn {}
1091#[cfg(feature = "full")]
1092#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1093impl PartialEq for ItemFn {
1094 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")))]
1101impl Eq for ItemForeignMod {}
1102#[cfg(feature = "full")]
1103#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1104impl PartialEq for ItemForeignMod {
1105 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")))]
1112impl Eq for ItemImpl {}
1113#[cfg(feature = "full")]
1114#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1115impl PartialEq for ItemImpl {
1116 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")))]
1125impl Eq for ItemMacro {}
1126#[cfg(feature = "full")]
1127#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1128impl PartialEq for ItemMacro {
1129 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")))]
1136impl Eq for ItemMod {}
1137#[cfg(feature = "full")]
1138#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1139impl PartialEq for ItemMod {
1140 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")))]
1148impl Eq for ItemStatic {}
1149#[cfg(feature = "full")]
1150#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1151impl PartialEq for ItemStatic {
1152 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")))]
1160impl Eq for ItemStruct {}
1161#[cfg(feature = "full")]
1162#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1163impl PartialEq for ItemStruct {
1164 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")))]
1172impl Eq for ItemTrait {}
1173#[cfg(feature = "full")]
1174#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1175impl PartialEq for ItemTrait {
1176 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")))]
1186impl Eq for ItemTraitAlias {}
1187#[cfg(feature = "full")]
1188#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1189impl PartialEq for ItemTraitAlias {
1190 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")))]
1197impl Eq for ItemType {}
1198#[cfg(feature = "full")]
1199#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1200impl PartialEq for ItemType {
1201 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")))]
1208impl Eq for ItemUnion {}
1209#[cfg(feature = "full")]
1210#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1211impl PartialEq for ItemUnion {
1212 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")))]
1219impl Eq for ItemUse {}
1220#[cfg(feature = "full")]
1221#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1222impl PartialEq for ItemUse {
1223 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")))]
1230impl Eq for Label {}
1231#[cfg(feature = "full")]
1232#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1233impl PartialEq for Label {
1234 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")))]
1240impl Eq for LifetimeParam {}
1241#[cfg(any(feature = "derive", feature = "full"))]
1242#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1243impl PartialEq for LifetimeParam {
1244 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")))]
1250impl Eq for Lit {}
1251#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1252impl PartialEq for Lit {
1253 fn eq(&self, other: &Self) -> bool {
1254 match (self, other) {
1255 (Lit::Str(self0: &LitStr), Lit::Str(other0: &LitStr)) => self0 == other0,
1256 (Lit::ByteStr(self0: &LitByteStr), Lit::ByteStr(other0: &LitByteStr)) => self0 == other0,
1257 (Lit::Byte(self0: &LitByte), Lit::Byte(other0: &LitByte)) => self0 == other0,
1258 (Lit::Char(self0: &LitChar), Lit::Char(other0: &LitChar)) => self0 == other0,
1259 (Lit::Int(self0: &LitInt), Lit::Int(other0: &LitInt)) => self0 == other0,
1260 (Lit::Float(self0: &LitFloat), Lit::Float(other0: &LitFloat)) => self0 == other0,
1261 (Lit::Bool(self0: &LitBool), Lit::Bool(other0: &LitBool)) => self0 == other0,
1262 (Lit::Verbatim(self0: &Literal), Lit::Verbatim(other0: &Literal)) => {
1263 self0.to_string() == other0.to_string()
1264 }
1265 _ => false,
1266 }
1267 }
1268}
1269#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1270impl Eq for LitBool {}
1271#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1272impl PartialEq for LitBool {
1273 fn eq(&self, other: &Self) -> bool {
1274 self.value == other.value
1275 }
1276}
1277#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1278impl Eq for LitByte {}
1279#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1280impl Eq for LitByteStr {}
1281#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1282impl Eq for LitChar {}
1283#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1284impl Eq for LitFloat {}
1285#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1286impl Eq for LitInt {}
1287#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1288impl Eq for LitStr {}
1289#[cfg(feature = "full")]
1290#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1291impl Eq for Local {}
1292#[cfg(feature = "full")]
1293#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1294impl PartialEq for Local {
1295 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")))]
1301impl Eq for LocalInit {}
1302#[cfg(feature = "full")]
1303#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1304impl PartialEq for LocalInit {
1305 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")))]
1311impl Eq for Macro {}
1312#[cfg(any(feature = "derive", feature = "full"))]
1313#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1314impl PartialEq for Macro {
1315 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")))]
1322impl Eq for MacroDelimiter {}
1323#[cfg(any(feature = "derive", feature = "full"))]
1324#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1325impl PartialEq for MacroDelimiter {
1326 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")))]
1337impl Eq for Meta {}
1338#[cfg(any(feature = "derive", feature = "full"))]
1339#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1340impl PartialEq for Meta {
1341 fn eq(&self, other: &Self) -> bool {
1342 match (self, other) {
1343 (Meta::Path(self0: &Path), Meta::Path(other0: &Path)) => self0 == other0,
1344 (Meta::List(self0: &MetaList), Meta::List(other0: &MetaList)) => self0 == other0,
1345 (Meta::NameValue(self0: &MetaNameValue), Meta::NameValue(other0: &MetaNameValue)) => self0 == other0,
1346 _ => false,
1347 }
1348 }
1349}
1350#[cfg(any(feature = "derive", feature = "full"))]
1351#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1352impl Eq for MetaList {}
1353#[cfg(any(feature = "derive", feature = "full"))]
1354#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1355impl PartialEq for MetaList {
1356 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")))]
1363impl Eq for MetaNameValue {}
1364#[cfg(any(feature = "derive", feature = "full"))]
1365#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1366impl PartialEq for MetaNameValue {
1367 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")))]
1373impl Eq for ParenthesizedGenericArguments {}
1374#[cfg(any(feature = "derive", feature = "full"))]
1375#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1376impl PartialEq for ParenthesizedGenericArguments {
1377 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")))]
1383impl Eq for Pat {}
1384#[cfg(feature = "full")]
1385#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1386impl PartialEq for Pat {
1387 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")))]
1414impl Eq for PatIdent {}
1415#[cfg(feature = "full")]
1416#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1417impl PartialEq for PatIdent {
1418 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")))]
1426impl Eq for PatOr {}
1427#[cfg(feature = "full")]
1428#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1429impl PartialEq for PatOr {
1430 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")))]
1437impl Eq for PatParen {}
1438#[cfg(feature = "full")]
1439#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1440impl PartialEq for PatParen {
1441 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")))]
1447impl Eq for PatReference {}
1448#[cfg(feature = "full")]
1449#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1450impl PartialEq for PatReference {
1451 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")))]
1458impl Eq for PatRest {}
1459#[cfg(feature = "full")]
1460#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1461impl PartialEq for PatRest {
1462 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")))]
1468impl Eq for PatSlice {}
1469#[cfg(feature = "full")]
1470#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1471impl PartialEq for PatSlice {
1472 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")))]
1478impl Eq for PatStruct {}
1479#[cfg(feature = "full")]
1480#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1481impl PartialEq for PatStruct {
1482 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")))]
1489impl Eq for PatTuple {}
1490#[cfg(feature = "full")]
1491#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1492impl PartialEq for PatTuple {
1493 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")))]
1499impl Eq for PatTupleStruct {}
1500#[cfg(feature = "full")]
1501#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1502impl PartialEq for PatTupleStruct {
1503 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")))]
1510impl Eq for PatType {}
1511#[cfg(feature = "full")]
1512#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1513impl PartialEq for PatType {
1514 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")))]
1520impl Eq for PatWild {}
1521#[cfg(feature = "full")]
1522#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1523impl PartialEq for PatWild {
1524 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")))]
1530impl Eq for Path {}
1531#[cfg(any(feature = "derive", feature = "full"))]
1532#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1533impl PartialEq for Path {
1534 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")))]
1540impl Eq for PathArguments {}
1541#[cfg(any(feature = "derive", feature = "full"))]
1542#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1543impl PartialEq for PathArguments {
1544 fn eq(&self, other: &Self) -> bool {
1545 match (self, other) {
1546 (PathArguments::None, PathArguments::None) => true,
1547 (
1548 PathArguments::AngleBracketed(self0: &AngleBracketedGenericArguments),
1549 PathArguments::AngleBracketed(other0: &AngleBracketedGenericArguments),
1550 ) => self0 == other0,
1551 (
1552 PathArguments::Parenthesized(self0: &ParenthesizedGenericArguments),
1553 PathArguments::Parenthesized(other0: &ParenthesizedGenericArguments),
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")))]
1561impl Eq for PathSegment {}
1562#[cfg(any(feature = "derive", feature = "full"))]
1563#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1564impl PartialEq for PathSegment {
1565 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")))]
1571impl Eq for PredicateLifetime {}
1572#[cfg(any(feature = "derive", feature = "full"))]
1573#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1574impl PartialEq for PredicateLifetime {
1575 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")))]
1581impl Eq for PredicateType {}
1582#[cfg(any(feature = "derive", feature = "full"))]
1583#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1584impl PartialEq for PredicateType {
1585 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")))]
1592impl Eq for QSelf {}
1593#[cfg(any(feature = "derive", feature = "full"))]
1594#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1595impl PartialEq for QSelf {
1596 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")))]
1603impl Eq for RangeLimits {}
1604#[cfg(feature = "full")]
1605#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1606impl PartialEq for RangeLimits {
1607 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")))]
1617impl Eq for Receiver {}
1618#[cfg(feature = "full")]
1619#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1620impl PartialEq for Receiver {
1621 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")))]
1629impl Eq for ReturnType {}
1630#[cfg(any(feature = "derive", feature = "full"))]
1631#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1632impl PartialEq for ReturnType {
1633 fn eq(&self, other: &Self) -> bool {
1634 match (self, other) {
1635 (ReturnType::Default, ReturnType::Default) => true,
1636 (ReturnType::Type(_, self1: &Box), ReturnType::Type(_, other1: &Box)) => self1 == other1,
1637 _ => false,
1638 }
1639 }
1640}
1641#[cfg(feature = "full")]
1642#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1643impl Eq for Signature {}
1644#[cfg(feature = "full")]
1645#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1646impl PartialEq for Signature {
1647 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")))]
1657impl Eq for StaticMutability {}
1658#[cfg(feature = "full")]
1659#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1660impl PartialEq for StaticMutability {
1661 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")))]
1671impl Eq for Stmt {}
1672#[cfg(feature = "full")]
1673#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1674impl PartialEq for Stmt {
1675 fn eq(&self, other: &Self) -> bool {
1676 match (self, other) {
1677 (Stmt::Local(self0: &Local), Stmt::Local(other0: &Local)) => self0 == other0,
1678 (Stmt::Item(self0: &Item), Stmt::Item(other0: &Item)) => self0 == other0,
1679 (Stmt::Expr(self0: &Expr, self1: &Option), Stmt::Expr(other0: &Expr, other1: &Option)) => {
1680 self0 == other0 && self1 == other1
1681 }
1682 (Stmt::Macro(self0: &StmtMacro), Stmt::Macro(other0: &StmtMacro)) => self0 == other0,
1683 _ => false,
1684 }
1685 }
1686}
1687#[cfg(feature = "full")]
1688#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1689impl Eq for StmtMacro {}
1690#[cfg(feature = "full")]
1691#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1692impl PartialEq for StmtMacro {
1693 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")))]
1700impl Eq for TraitBound {}
1701#[cfg(any(feature = "derive", feature = "full"))]
1702#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1703impl PartialEq for TraitBound {
1704 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")))]
1711impl Eq for TraitBoundModifier {}
1712#[cfg(any(feature = "derive", feature = "full"))]
1713#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1714impl PartialEq for TraitBoundModifier {
1715 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")))]
1725impl Eq for TraitItem {}
1726#[cfg(feature = "full")]
1727#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1728impl PartialEq for TraitItem {
1729 fn eq(&self, other: &Self) -> bool {
1730 match (self, other) {
1731 (TraitItem::Const(self0: &TraitItemConst), TraitItem::Const(other0: &TraitItemConst)) => self0 == other0,
1732 (TraitItem::Fn(self0: &TraitItemFn), TraitItem::Fn(other0: &TraitItemFn)) => self0 == other0,
1733 (TraitItem::Type(self0: &TraitItemType), TraitItem::Type(other0: &TraitItemType)) => self0 == other0,
1734 (TraitItem::Macro(self0: &TraitItemMacro), TraitItem::Macro(other0: &TraitItemMacro)) => self0 == other0,
1735 (TraitItem::Verbatim(self0: &TokenStream), TraitItem::Verbatim(other0: &TokenStream)) => {
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")))]
1744impl Eq for TraitItemConst {}
1745#[cfg(feature = "full")]
1746#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1747impl PartialEq for TraitItemConst {
1748 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")))]
1756impl Eq for TraitItemFn {}
1757#[cfg(feature = "full")]
1758#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1759impl PartialEq for TraitItemFn {
1760 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")))]
1767impl Eq for TraitItemMacro {}
1768#[cfg(feature = "full")]
1769#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1770impl PartialEq for TraitItemMacro {
1771 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")))]
1778impl Eq for TraitItemType {}
1779#[cfg(feature = "full")]
1780#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1781impl PartialEq for TraitItemType {
1782 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")))]
1790impl Eq for Type {}
1791#[cfg(any(feature = "derive", feature = "full"))]
1792#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1793impl PartialEq for Type {
1794 fn eq(&self, other: &Self) -> bool {
1795 match (self, other) {
1796 (Type::Array(self0: &TypeArray), Type::Array(other0: &TypeArray)) => self0 == other0,
1797 (Type::BareFn(self0: &TypeBareFn), Type::BareFn(other0: &TypeBareFn)) => self0 == other0,
1798 (Type::Group(self0: &TypeGroup), Type::Group(other0: &TypeGroup)) => self0 == other0,
1799 (Type::ImplTrait(self0: &TypeImplTrait), Type::ImplTrait(other0: &TypeImplTrait)) => self0 == other0,
1800 (Type::Infer(self0: &TypeInfer), Type::Infer(other0: &TypeInfer)) => self0 == other0,
1801 (Type::Macro(self0: &TypeMacro), Type::Macro(other0: &TypeMacro)) => self0 == other0,
1802 (Type::Never(self0: &TypeNever), Type::Never(other0: &TypeNever)) => self0 == other0,
1803 (Type::Paren(self0: &TypeParen), Type::Paren(other0: &TypeParen)) => self0 == other0,
1804 (Type::Path(self0: &TypePath), Type::Path(other0: &TypePath)) => self0 == other0,
1805 (Type::Ptr(self0: &TypePtr), Type::Ptr(other0: &TypePtr)) => self0 == other0,
1806 (Type::Reference(self0: &TypeReference), Type::Reference(other0: &TypeReference)) => self0 == other0,
1807 (Type::Slice(self0: &TypeSlice), Type::Slice(other0: &TypeSlice)) => self0 == other0,
1808 (Type::TraitObject(self0: &TypeTraitObject), Type::TraitObject(other0: &TypeTraitObject)) => self0 == other0,
1809 (Type::Tuple(self0: &TypeTuple), Type::Tuple(other0: &TypeTuple)) => self0 == other0,
1810 (Type::Verbatim(self0: &TokenStream), Type::Verbatim(other0: &TokenStream)) => {
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")))]
1819impl Eq for TypeArray {}
1820#[cfg(any(feature = "derive", feature = "full"))]
1821#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1822impl PartialEq for TypeArray {
1823 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")))]
1829impl Eq for TypeBareFn {}
1830#[cfg(any(feature = "derive", feature = "full"))]
1831#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1832impl PartialEq for TypeBareFn {
1833 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")))]
1841impl Eq for TypeGroup {}
1842#[cfg(any(feature = "derive", feature = "full"))]
1843#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1844impl PartialEq for TypeGroup {
1845 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")))]
1851impl Eq for TypeImplTrait {}
1852#[cfg(any(feature = "derive", feature = "full"))]
1853#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1854impl PartialEq for TypeImplTrait {
1855 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")))]
1861impl Eq for TypeInfer {}
1862#[cfg(any(feature = "derive", feature = "full"))]
1863#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1864impl PartialEq for TypeInfer {
1865 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")))]
1871impl Eq for TypeMacro {}
1872#[cfg(any(feature = "derive", feature = "full"))]
1873#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1874impl PartialEq for TypeMacro {
1875 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")))]
1881impl Eq for TypeNever {}
1882#[cfg(any(feature = "derive", feature = "full"))]
1883#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1884impl PartialEq for TypeNever {
1885 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")))]
1891impl Eq for TypeParam {}
1892#[cfg(any(feature = "derive", feature = "full"))]
1893#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1894impl PartialEq for TypeParam {
1895 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")))]
1903impl Eq for TypeParamBound {}
1904#[cfg(any(feature = "derive", feature = "full"))]
1905#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1906impl PartialEq for TypeParamBound {
1907 fn eq(&self, other: &Self) -> bool {
1908 match (self, other) {
1909 (TypeParamBound::Trait(self0: &TraitBound), TypeParamBound::Trait(other0: &TraitBound)) => {
1910 self0 == other0
1911 }
1912 (TypeParamBound::Lifetime(self0: &Lifetime), TypeParamBound::Lifetime(other0: &Lifetime)) => {
1913 self0 == other0
1914 }
1915 (TypeParamBound::Verbatim(self0: &TokenStream), TypeParamBound::Verbatim(other0: &TokenStream)) => {
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")))]
1924impl Eq for TypeParen {}
1925#[cfg(any(feature = "derive", feature = "full"))]
1926#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1927impl PartialEq for TypeParen {
1928 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")))]
1934impl Eq for TypePath {}
1935#[cfg(any(feature = "derive", feature = "full"))]
1936#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1937impl PartialEq for TypePath {
1938 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")))]
1944impl Eq for TypePtr {}
1945#[cfg(any(feature = "derive", feature = "full"))]
1946#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1947impl PartialEq for TypePtr {
1948 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")))]
1955impl Eq for TypeReference {}
1956#[cfg(any(feature = "derive", feature = "full"))]
1957#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1958impl PartialEq for TypeReference {
1959 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")))]
1966impl Eq for TypeSlice {}
1967#[cfg(any(feature = "derive", feature = "full"))]
1968#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1969impl PartialEq for TypeSlice {
1970 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")))]
1976impl Eq for TypeTraitObject {}
1977#[cfg(any(feature = "derive", feature = "full"))]
1978#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1979impl PartialEq for TypeTraitObject {
1980 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")))]
1986impl Eq for TypeTuple {}
1987#[cfg(any(feature = "derive", feature = "full"))]
1988#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1989impl PartialEq for TypeTuple {
1990 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")))]
1996impl Eq for UnOp {}
1997#[cfg(any(feature = "derive", feature = "full"))]
1998#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1999impl PartialEq for UnOp {
2000 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")))]
2011impl Eq for UseGlob {}
2012#[cfg(feature = "full")]
2013#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2014impl PartialEq for UseGlob {
2015 fn eq(&self, _other: &Self) -> bool {
2016 true
2017 }
2018}
2019#[cfg(feature = "full")]
2020#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2021impl Eq for UseGroup {}
2022#[cfg(feature = "full")]
2023#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2024impl PartialEq for UseGroup {
2025 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")))]
2031impl Eq for UseName {}
2032#[cfg(feature = "full")]
2033#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2034impl PartialEq for UseName {
2035 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")))]
2041impl Eq for UsePath {}
2042#[cfg(feature = "full")]
2043#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2044impl PartialEq for UsePath {
2045 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")))]
2051impl Eq for UseRename {}
2052#[cfg(feature = "full")]
2053#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2054impl PartialEq for UseRename {
2055 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")))]
2061impl Eq for UseTree {}
2062#[cfg(feature = "full")]
2063#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2064impl PartialEq for UseTree {
2065 fn eq(&self, other: &Self) -> bool {
2066 match (self, other) {
2067 (UseTree::Path(self0: &UsePath), UseTree::Path(other0: &UsePath)) => self0 == other0,
2068 (UseTree::Name(self0: &UseName), UseTree::Name(other0: &UseName)) => self0 == other0,
2069 (UseTree::Rename(self0: &UseRename), UseTree::Rename(other0: &UseRename)) => self0 == other0,
2070 (UseTree::Glob(self0: &UseGlob), UseTree::Glob(other0: &UseGlob)) => self0 == other0,
2071 (UseTree::Group(self0: &UseGroup), UseTree::Group(other0: &UseGroup)) => self0 == other0,
2072 _ => false,
2073 }
2074 }
2075}
2076#[cfg(feature = "full")]
2077#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2078impl Eq for Variadic {}
2079#[cfg(feature = "full")]
2080#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2081impl PartialEq for Variadic {
2082 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")))]
2088impl Eq for Variant {}
2089#[cfg(any(feature = "derive", feature = "full"))]
2090#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2091impl PartialEq for Variant {
2092 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")))]
2099impl Eq for VisRestricted {}
2100#[cfg(any(feature = "derive", feature = "full"))]
2101#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2102impl PartialEq for VisRestricted {
2103 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")))]
2109impl Eq for Visibility {}
2110#[cfg(any(feature = "derive", feature = "full"))]
2111#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2112impl PartialEq for Visibility {
2113 fn eq(&self, other: &Self) -> bool {
2114 match (self, other) {
2115 (Visibility::Public(_), Visibility::Public(_)) => true,
2116 (Visibility::Restricted(self0: &VisRestricted), Visibility::Restricted(other0: &VisRestricted)) => {
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")))]
2126impl Eq for WhereClause {}
2127#[cfg(any(feature = "derive", feature = "full"))]
2128#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2129impl PartialEq for WhereClause {
2130 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")))]
2136impl Eq for WherePredicate {}
2137#[cfg(any(feature = "derive", feature = "full"))]
2138#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2139impl PartialEq for WherePredicate {
2140 fn eq(&self, other: &Self) -> bool {
2141 match (self, other) {
2142 (WherePredicate::Lifetime(self0: &PredicateLifetime), WherePredicate::Lifetime(other0: &PredicateLifetime)) => {
2143 self0 == other0
2144 }
2145 (WherePredicate::Type(self0: &PredicateType), WherePredicate::Type(other0: &PredicateType)) => {
2146 self0 == other0
2147 }
2148 _ => false,
2149 }
2150 }
2151}
2152