xref: /third_party/rust/crates/syn/src/gen/eq.rs (revision fad3a1d3)
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), 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")))]
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            (Expr::MethodCall(self0), Expr::MethodCall(other0)) => self0 == other0,
289            (Expr::Paren(self0), Expr::Paren(other0)) => self0 == other0,
290            (Expr::Path(self0), Expr::Path(other0)) => self0 == other0,
291            #[cfg(feature = "full")]
292            (Expr::Range(self0), Expr::Range(other0)) => self0 == other0,
293            (Expr::Reference(self0), Expr::Reference(other0)) => self0 == other0,
294            #[cfg(feature = "full")]
295            (Expr::Repeat(self0), Expr::Repeat(other0)) => self0 == other0,
296            #[cfg(feature = "full")]
297            (Expr::Return(self0), Expr::Return(other0)) => self0 == other0,
298            (Expr::Struct(self0), Expr::Struct(other0)) => self0 == other0,
299            #[cfg(feature = "full")]
300            (Expr::Try(self0), Expr::Try(other0)) => self0 == other0,
301            #[cfg(feature = "full")]
302            (Expr::TryBlock(self0), Expr::TryBlock(other0)) => self0 == other0,
303            #[cfg(feature = "full")]
304            (Expr::Tuple(self0), Expr::Tuple(other0)) => self0 == other0,
305            (Expr::Unary(self0), Expr::Unary(other0)) => self0 == other0,
306            #[cfg(feature = "full")]
307            (Expr::Unsafe(self0), Expr::Unsafe(other0)) => self0 == other0,
308            (Expr::Verbatim(self0), Expr::Verbatim(other0)) => {
309                TokenStreamHelper(self0) == TokenStreamHelper(other0)
310            }
311            #[cfg(feature = "full")]
312            (Expr::While(self0), Expr::While(other0)) => self0 == other0,
313            #[cfg(feature = "full")]
314            (Expr::Yield(self0), Expr::Yield(other0)) => self0 == other0,
315            _ => false,
316        }
317    }
318}
319#[cfg(feature = "full")]
320#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
321impl Eq for ExprArray {}
322#[cfg(feature = "full")]
323#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
324impl PartialEq for ExprArray {
325    fn eq(&self, other: &Self) -> bool {
326        self.attrs == other.attrs && self.elems == other.elems
327    }
328}
329#[cfg(feature = "full")]
330#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
331impl Eq for ExprAssign {}
332#[cfg(feature = "full")]
333#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
334impl PartialEq for ExprAssign {
335    fn eq(&self, other: &Self) -> bool {
336        self.attrs == other.attrs && self.left == other.left && self.right == other.right
337    }
338}
339#[cfg(feature = "full")]
340#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
341impl Eq for ExprAsync {}
342#[cfg(feature = "full")]
343#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
344impl PartialEq for ExprAsync {
345    fn eq(&self, other: &Self) -> bool {
346        self.attrs == other.attrs && self.capture == other.capture
347            && self.block == other.block
348    }
349}
350#[cfg(feature = "full")]
351#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
352impl Eq for ExprAwait {}
353#[cfg(feature = "full")]
354#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
355impl PartialEq for ExprAwait {
356    fn eq(&self, other: &Self) -> bool {
357        self.attrs == other.attrs && self.base == other.base
358    }
359}
360#[cfg(any(feature = "derive", feature = "full"))]
361#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
362impl Eq for ExprBinary {}
363#[cfg(any(feature = "derive", feature = "full"))]
364#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
365impl PartialEq for ExprBinary {
366    fn eq(&self, other: &Self) -> bool {
367        self.attrs == other.attrs && self.left == other.left && self.op == other.op
368            && self.right == other.right
369    }
370}
371#[cfg(feature = "full")]
372#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
373impl Eq for ExprBlock {}
374#[cfg(feature = "full")]
375#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
376impl PartialEq for ExprBlock {
377    fn eq(&self, other: &Self) -> bool {
378        self.attrs == other.attrs && self.label == other.label
379            && self.block == other.block
380    }
381}
382#[cfg(feature = "full")]
383#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
384impl Eq for ExprBreak {}
385#[cfg(feature = "full")]
386#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
387impl PartialEq for ExprBreak {
388    fn eq(&self, other: &Self) -> bool {
389        self.attrs == other.attrs && self.label == other.label && self.expr == other.expr
390    }
391}
392#[cfg(any(feature = "derive", feature = "full"))]
393#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
394impl Eq for ExprCall {}
395#[cfg(any(feature = "derive", feature = "full"))]
396#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
397impl PartialEq for ExprCall {
398    fn eq(&self, other: &Self) -> bool {
399        self.attrs == other.attrs && self.func == other.func && self.args == other.args
400    }
401}
402#[cfg(any(feature = "derive", feature = "full"))]
403#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
404impl Eq for ExprCast {}
405#[cfg(any(feature = "derive", feature = "full"))]
406#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
407impl PartialEq for ExprCast {
408    fn eq(&self, other: &Self) -> bool {
409        self.attrs == other.attrs && self.expr == other.expr && self.ty == other.ty
410    }
411}
412#[cfg(feature = "full")]
413#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
414impl Eq for ExprClosure {}
415#[cfg(feature = "full")]
416#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
417impl PartialEq for ExprClosure {
418    fn eq(&self, other: &Self) -> bool {
419        self.attrs == other.attrs && self.lifetimes == other.lifetimes
420            && self.constness == other.constness && self.movability == other.movability
421            && self.asyncness == other.asyncness && self.capture == other.capture
422            && self.inputs == other.inputs && self.output == other.output
423            && self.body == other.body
424    }
425}
426#[cfg(feature = "full")]
427#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
428impl Eq for ExprConst {}
429#[cfg(feature = "full")]
430#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
431impl PartialEq for ExprConst {
432    fn eq(&self, other: &Self) -> bool {
433        self.attrs == other.attrs && self.block == other.block
434    }
435}
436#[cfg(feature = "full")]
437#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
438impl Eq for ExprContinue {}
439#[cfg(feature = "full")]
440#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
441impl PartialEq for ExprContinue {
442    fn eq(&self, other: &Self) -> bool {
443        self.attrs == other.attrs && self.label == other.label
444    }
445}
446#[cfg(any(feature = "derive", feature = "full"))]
447#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
448impl Eq for ExprField {}
449#[cfg(any(feature = "derive", feature = "full"))]
450#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
451impl PartialEq for ExprField {
452    fn eq(&self, other: &Self) -> bool {
453        self.attrs == other.attrs && self.base == other.base
454            && self.member == other.member
455    }
456}
457#[cfg(feature = "full")]
458#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
459impl Eq for ExprForLoop {}
460#[cfg(feature = "full")]
461#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
462impl PartialEq for ExprForLoop {
463    fn eq(&self, other: &Self) -> bool {
464        self.attrs == other.attrs && self.label == other.label && self.pat == other.pat
465            && self.expr == other.expr && self.body == other.body
466    }
467}
468#[cfg(any(feature = "derive", feature = "full"))]
469#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
470impl Eq for ExprGroup {}
471#[cfg(any(feature = "derive", feature = "full"))]
472#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
473impl PartialEq for ExprGroup {
474    fn eq(&self, other: &Self) -> bool {
475        self.attrs == other.attrs && self.expr == other.expr
476    }
477}
478#[cfg(feature = "full")]
479#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
480impl Eq for ExprIf {}
481#[cfg(feature = "full")]
482#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
483impl PartialEq for ExprIf {
484    fn eq(&self, other: &Self) -> bool {
485        self.attrs == other.attrs && self.cond == other.cond
486            && self.then_branch == other.then_branch
487            && self.else_branch == other.else_branch
488    }
489}
490#[cfg(any(feature = "derive", feature = "full"))]
491#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
492impl Eq for ExprIndex {}
493#[cfg(any(feature = "derive", feature = "full"))]
494#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
495impl PartialEq for ExprIndex {
496    fn eq(&self, other: &Self) -> bool {
497        self.attrs == other.attrs && self.expr == other.expr && self.index == other.index
498    }
499}
500#[cfg(feature = "full")]
501#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
502impl Eq for ExprInfer {}
503#[cfg(feature = "full")]
504#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
505impl PartialEq for ExprInfer {
506    fn eq(&self, other: &Self) -> bool {
507        self.attrs == other.attrs
508    }
509}
510#[cfg(feature = "full")]
511#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
512impl Eq for ExprLet {}
513#[cfg(feature = "full")]
514#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
515impl PartialEq for ExprLet {
516    fn eq(&self, other: &Self) -> bool {
517        self.attrs == other.attrs && self.pat == other.pat && self.expr == other.expr
518    }
519}
520#[cfg(any(feature = "derive", feature = "full"))]
521#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
522impl Eq for ExprLit {}
523#[cfg(any(feature = "derive", feature = "full"))]
524#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
525impl PartialEq for ExprLit {
526    fn eq(&self, other: &Self) -> bool {
527        self.attrs == other.attrs && self.lit == other.lit
528    }
529}
530#[cfg(feature = "full")]
531#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
532impl Eq for ExprLoop {}
533#[cfg(feature = "full")]
534#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
535impl PartialEq for ExprLoop {
536    fn eq(&self, other: &Self) -> bool {
537        self.attrs == other.attrs && self.label == other.label && self.body == other.body
538    }
539}
540#[cfg(any(feature = "derive", feature = "full"))]
541#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
542impl Eq for ExprMacro {}
543#[cfg(any(feature = "derive", feature = "full"))]
544#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
545impl PartialEq for ExprMacro {
546    fn eq(&self, other: &Self) -> bool {
547        self.attrs == other.attrs && self.mac == other.mac
548    }
549}
550#[cfg(feature = "full")]
551#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
552impl Eq for ExprMatch {}
553#[cfg(feature = "full")]
554#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
555impl PartialEq for ExprMatch {
556    fn eq(&self, other: &Self) -> bool {
557        self.attrs == other.attrs && self.expr == other.expr && self.arms == other.arms
558    }
559}
560#[cfg(any(feature = "derive", feature = "full"))]
561#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
562impl Eq for ExprMethodCall {}
563#[cfg(any(feature = "derive", feature = "full"))]
564#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
565impl PartialEq for ExprMethodCall {
566    fn eq(&self, other: &Self) -> bool {
567        self.attrs == other.attrs && self.receiver == other.receiver
568            && self.method == other.method && self.turbofish == other.turbofish
569            && self.args == other.args
570    }
571}
572#[cfg(any(feature = "derive", feature = "full"))]
573#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
574impl Eq for ExprParen {}
575#[cfg(any(feature = "derive", feature = "full"))]
576#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
577impl PartialEq for ExprParen {
578    fn eq(&self, other: &Self) -> bool {
579        self.attrs == other.attrs && self.expr == other.expr
580    }
581}
582#[cfg(any(feature = "derive", feature = "full"))]
583#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
584impl Eq for ExprPath {}
585#[cfg(any(feature = "derive", feature = "full"))]
586#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
587impl PartialEq for ExprPath {
588    fn eq(&self, other: &Self) -> bool {
589        self.attrs == other.attrs && self.qself == other.qself && self.path == other.path
590    }
591}
592#[cfg(feature = "full")]
593#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
594impl Eq for ExprRange {}
595#[cfg(feature = "full")]
596#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
597impl PartialEq for ExprRange {
598    fn eq(&self, other: &Self) -> bool {
599        self.attrs == other.attrs && self.start == other.start
600            && self.limits == other.limits && self.end == other.end
601    }
602}
603#[cfg(any(feature = "derive", feature = "full"))]
604#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
605impl Eq for ExprReference {}
606#[cfg(any(feature = "derive", feature = "full"))]
607#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
608impl PartialEq for ExprReference {
609    fn eq(&self, other: &Self) -> bool {
610        self.attrs == other.attrs && self.mutability == other.mutability
611            && self.expr == other.expr
612    }
613}
614#[cfg(feature = "full")]
615#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
616impl Eq for ExprRepeat {}
617#[cfg(feature = "full")]
618#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
619impl PartialEq for ExprRepeat {
620    fn eq(&self, other: &Self) -> bool {
621        self.attrs == other.attrs && self.expr == other.expr && self.len == other.len
622    }
623}
624#[cfg(feature = "full")]
625#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
626impl Eq for ExprReturn {}
627#[cfg(feature = "full")]
628#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
629impl PartialEq for ExprReturn {
630    fn eq(&self, other: &Self) -> bool {
631        self.attrs == other.attrs && self.expr == other.expr
632    }
633}
634#[cfg(any(feature = "derive", feature = "full"))]
635#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
636impl Eq for ExprStruct {}
637#[cfg(any(feature = "derive", feature = "full"))]
638#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
639impl PartialEq for ExprStruct {
640    fn eq(&self, other: &Self) -> bool {
641        self.attrs == other.attrs && self.qself == other.qself && self.path == other.path
642            && self.fields == other.fields && self.dot2_token == other.dot2_token
643            && self.rest == other.rest
644    }
645}
646#[cfg(feature = "full")]
647#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
648impl Eq for ExprTry {}
649#[cfg(feature = "full")]
650#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
651impl PartialEq for ExprTry {
652    fn eq(&self, other: &Self) -> bool {
653        self.attrs == other.attrs && self.expr == other.expr
654    }
655}
656#[cfg(feature = "full")]
657#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
658impl Eq for ExprTryBlock {}
659#[cfg(feature = "full")]
660#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
661impl PartialEq for ExprTryBlock {
662    fn eq(&self, other: &Self) -> bool {
663        self.attrs == other.attrs && self.block == other.block
664    }
665}
666#[cfg(feature = "full")]
667#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
668impl Eq for ExprTuple {}
669#[cfg(feature = "full")]
670#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
671impl PartialEq for ExprTuple {
672    fn eq(&self, other: &Self) -> bool {
673        self.attrs == other.attrs && self.elems == other.elems
674    }
675}
676#[cfg(any(feature = "derive", feature = "full"))]
677#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
678impl Eq for ExprUnary {}
679#[cfg(any(feature = "derive", feature = "full"))]
680#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
681impl PartialEq for ExprUnary {
682    fn eq(&self, other: &Self) -> bool {
683        self.attrs == other.attrs && self.op == other.op && self.expr == other.expr
684    }
685}
686#[cfg(feature = "full")]
687#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
688impl Eq for ExprUnsafe {}
689#[cfg(feature = "full")]
690#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
691impl PartialEq for ExprUnsafe {
692    fn eq(&self, other: &Self) -> bool {
693        self.attrs == other.attrs && self.block == other.block
694    }
695}
696#[cfg(feature = "full")]
697#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
698impl Eq for ExprWhile {}
699#[cfg(feature = "full")]
700#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
701impl PartialEq for ExprWhile {
702    fn eq(&self, other: &Self) -> bool {
703        self.attrs == other.attrs && self.label == other.label && self.cond == other.cond
704            && self.body == other.body
705    }
706}
707#[cfg(feature = "full")]
708#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
709impl Eq for ExprYield {}
710#[cfg(feature = "full")]
711#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
712impl PartialEq for ExprYield {
713    fn eq(&self, other: &Self) -> bool {
714        self.attrs == other.attrs && self.expr == other.expr
715    }
716}
717#[cfg(any(feature = "derive", feature = "full"))]
718#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
719impl Eq for Field {}
720#[cfg(any(feature = "derive", feature = "full"))]
721#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
722impl PartialEq for Field {
723    fn eq(&self, other: &Self) -> bool {
724        self.attrs == other.attrs && self.vis == other.vis
725            && self.mutability == other.mutability && self.ident == other.ident
726            && self.colon_token == other.colon_token && self.ty == other.ty
727    }
728}
729#[cfg(any(feature = "derive", feature = "full"))]
730#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
731impl Eq for FieldMutability {}
732#[cfg(any(feature = "derive", feature = "full"))]
733#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
734impl PartialEq for FieldMutability {
735    fn eq(&self, other: &Self) -> bool {
736        match (self, other) {
737            (FieldMutability::None, FieldMutability::None) => true,
738        }
739    }
740}
741#[cfg(feature = "full")]
742#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
743impl Eq for FieldPat {}
744#[cfg(feature = "full")]
745#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
746impl PartialEq for FieldPat {
747    fn eq(&self, other: &Self) -> bool {
748        self.attrs == other.attrs && self.member == other.member
749            && self.colon_token == other.colon_token && self.pat == other.pat
750    }
751}
752#[cfg(any(feature = "derive", feature = "full"))]
753#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
754impl Eq for FieldValue {}
755#[cfg(any(feature = "derive", feature = "full"))]
756#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
757impl PartialEq for FieldValue {
758    fn eq(&self, other: &Self) -> bool {
759        self.attrs == other.attrs && self.member == other.member
760            && self.colon_token == other.colon_token && self.expr == other.expr
761    }
762}
763#[cfg(any(feature = "derive", feature = "full"))]
764#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
765impl Eq for Fields {}
766#[cfg(any(feature = "derive", feature = "full"))]
767#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
768impl PartialEq for Fields {
769    fn eq(&self, other: &Self) -> bool {
770        match (self, other) {
771            (Fields::Named(self0), Fields::Named(other0)) => self0 == other0,
772            (Fields::Unnamed(self0), Fields::Unnamed(other0)) => self0 == other0,
773            (Fields::Unit, Fields::Unit) => true,
774            _ => false,
775        }
776    }
777}
778#[cfg(any(feature = "derive", feature = "full"))]
779#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
780impl Eq for FieldsNamed {}
781#[cfg(any(feature = "derive", feature = "full"))]
782#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
783impl PartialEq for FieldsNamed {
784    fn eq(&self, other: &Self) -> bool {
785        self.named == other.named
786    }
787}
788#[cfg(any(feature = "derive", feature = "full"))]
789#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
790impl Eq for FieldsUnnamed {}
791#[cfg(any(feature = "derive", feature = "full"))]
792#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
793impl PartialEq for FieldsUnnamed {
794    fn eq(&self, other: &Self) -> bool {
795        self.unnamed == other.unnamed
796    }
797}
798#[cfg(feature = "full")]
799#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
800impl Eq for File {}
801#[cfg(feature = "full")]
802#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
803impl PartialEq for File {
804    fn eq(&self, other: &Self) -> bool {
805        self.shebang == other.shebang && self.attrs == other.attrs
806            && self.items == other.items
807    }
808}
809#[cfg(feature = "full")]
810#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
811impl Eq for FnArg {}
812#[cfg(feature = "full")]
813#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
814impl PartialEq for FnArg {
815    fn eq(&self, other: &Self) -> bool {
816        match (self, other) {
817            (FnArg::Receiver(self0), FnArg::Receiver(other0)) => self0 == other0,
818            (FnArg::Typed(self0), FnArg::Typed(other0)) => self0 == other0,
819            _ => false,
820        }
821    }
822}
823#[cfg(feature = "full")]
824#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
825impl Eq for ForeignItem {}
826#[cfg(feature = "full")]
827#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
828impl PartialEq for ForeignItem {
829    fn eq(&self, other: &Self) -> bool {
830        match (self, other) {
831            (ForeignItem::Fn(self0), ForeignItem::Fn(other0)) => self0 == other0,
832            (ForeignItem::Static(self0), ForeignItem::Static(other0)) => self0 == other0,
833            (ForeignItem::Type(self0), ForeignItem::Type(other0)) => self0 == other0,
834            (ForeignItem::Macro(self0), ForeignItem::Macro(other0)) => self0 == other0,
835            (ForeignItem::Verbatim(self0), ForeignItem::Verbatim(other0)) => {
836                TokenStreamHelper(self0) == TokenStreamHelper(other0)
837            }
838            _ => false,
839        }
840    }
841}
842#[cfg(feature = "full")]
843#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
844impl Eq for ForeignItemFn {}
845#[cfg(feature = "full")]
846#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
847impl PartialEq for ForeignItemFn {
848    fn eq(&self, other: &Self) -> bool {
849        self.attrs == other.attrs && self.vis == other.vis && self.sig == other.sig
850    }
851}
852#[cfg(feature = "full")]
853#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
854impl Eq for ForeignItemMacro {}
855#[cfg(feature = "full")]
856#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
857impl PartialEq for ForeignItemMacro {
858    fn eq(&self, other: &Self) -> bool {
859        self.attrs == other.attrs && self.mac == other.mac
860            && self.semi_token == other.semi_token
861    }
862}
863#[cfg(feature = "full")]
864#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
865impl Eq for ForeignItemStatic {}
866#[cfg(feature = "full")]
867#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
868impl PartialEq for ForeignItemStatic {
869    fn eq(&self, other: &Self) -> bool {
870        self.attrs == other.attrs && self.vis == other.vis
871            && self.mutability == other.mutability && self.ident == other.ident
872            && self.ty == other.ty
873    }
874}
875#[cfg(feature = "full")]
876#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
877impl Eq for ForeignItemType {}
878#[cfg(feature = "full")]
879#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
880impl PartialEq for ForeignItemType {
881    fn eq(&self, other: &Self) -> bool {
882        self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident
883            && self.generics == other.generics
884    }
885}
886#[cfg(any(feature = "derive", feature = "full"))]
887#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
888impl Eq for GenericArgument {}
889#[cfg(any(feature = "derive", feature = "full"))]
890#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
891impl PartialEq for GenericArgument {
892    fn eq(&self, other: &Self) -> bool {
893        match (self, other) {
894            (GenericArgument::Lifetime(self0), GenericArgument::Lifetime(other0)) => {
895                self0 == other0
896            }
897            (GenericArgument::Type(self0), GenericArgument::Type(other0)) => {
898                self0 == other0
899            }
900            (GenericArgument::Const(self0), GenericArgument::Const(other0)) => {
901                self0 == other0
902            }
903            (GenericArgument::AssocType(self0), GenericArgument::AssocType(other0)) => {
904                self0 == other0
905            }
906            (GenericArgument::AssocConst(self0), GenericArgument::AssocConst(other0)) => {
907                self0 == other0
908            }
909            (GenericArgument::Constraint(self0), GenericArgument::Constraint(other0)) => {
910                self0 == other0
911            }
912            _ => false,
913        }
914    }
915}
916#[cfg(any(feature = "derive", feature = "full"))]
917#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
918impl Eq for GenericParam {}
919#[cfg(any(feature = "derive", feature = "full"))]
920#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
921impl PartialEq for GenericParam {
922    fn eq(&self, other: &Self) -> bool {
923        match (self, other) {
924            (GenericParam::Lifetime(self0), GenericParam::Lifetime(other0)) => {
925                self0 == other0
926            }
927            (GenericParam::Type(self0), GenericParam::Type(other0)) => self0 == other0,
928            (GenericParam::Const(self0), GenericParam::Const(other0)) => self0 == other0,
929            _ => false,
930        }
931    }
932}
933#[cfg(any(feature = "derive", feature = "full"))]
934#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
935impl Eq for Generics {}
936#[cfg(any(feature = "derive", feature = "full"))]
937#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
938impl PartialEq for Generics {
939    fn eq(&self, other: &Self) -> bool {
940        self.lt_token == other.lt_token && self.params == other.params
941            && self.gt_token == other.gt_token && self.where_clause == other.where_clause
942    }
943}
944#[cfg(feature = "full")]
945#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
946impl Eq for ImplItem {}
947#[cfg(feature = "full")]
948#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
949impl PartialEq for ImplItem {
950    fn eq(&self, other: &Self) -> bool {
951        match (self, other) {
952            (ImplItem::Const(self0), ImplItem::Const(other0)) => self0 == other0,
953            (ImplItem::Fn(self0), ImplItem::Fn(other0)) => self0 == other0,
954            (ImplItem::Type(self0), ImplItem::Type(other0)) => self0 == other0,
955            (ImplItem::Macro(self0), ImplItem::Macro(other0)) => self0 == other0,
956            (ImplItem::Verbatim(self0), ImplItem::Verbatim(other0)) => {
957                TokenStreamHelper(self0) == TokenStreamHelper(other0)
958            }
959            _ => false,
960        }
961    }
962}
963#[cfg(feature = "full")]
964#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
965impl Eq for ImplItemConst {}
966#[cfg(feature = "full")]
967#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
968impl PartialEq for ImplItemConst {
969    fn eq(&self, other: &Self) -> bool {
970        self.attrs == other.attrs && self.vis == other.vis
971            && self.defaultness == other.defaultness && self.ident == other.ident
972            && self.generics == other.generics && self.ty == other.ty
973            && self.expr == other.expr
974    }
975}
976#[cfg(feature = "full")]
977#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
978impl Eq for ImplItemFn {}
979#[cfg(feature = "full")]
980#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
981impl PartialEq for ImplItemFn {
982    fn eq(&self, other: &Self) -> bool {
983        self.attrs == other.attrs && self.vis == other.vis
984            && self.defaultness == other.defaultness && self.sig == other.sig
985            && self.block == other.block
986    }
987}
988#[cfg(feature = "full")]
989#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
990impl Eq for ImplItemMacro {}
991#[cfg(feature = "full")]
992#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
993impl PartialEq for ImplItemMacro {
994    fn eq(&self, other: &Self) -> bool {
995        self.attrs == other.attrs && self.mac == other.mac
996            && self.semi_token == other.semi_token
997    }
998}
999#[cfg(feature = "full")]
1000#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1001impl Eq for ImplItemType {}
1002#[cfg(feature = "full")]
1003#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1004impl PartialEq for ImplItemType {
1005    fn eq(&self, other: &Self) -> bool {
1006        self.attrs == other.attrs && self.vis == other.vis
1007            && self.defaultness == other.defaultness && self.ident == other.ident
1008            && self.generics == other.generics && self.ty == other.ty
1009    }
1010}
1011#[cfg(feature = "full")]
1012#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1013impl Eq for ImplRestriction {}
1014#[cfg(feature = "full")]
1015#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1016impl PartialEq for ImplRestriction {
1017    fn eq(&self, _other: &Self) -> bool {
1018        match *self {}
1019    }
1020}
1021#[cfg(feature = "full")]
1022#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1023impl Eq for Item {}
1024#[cfg(feature = "full")]
1025#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1026impl PartialEq for Item {
1027    fn eq(&self, other: &Self) -> bool {
1028        match (self, other) {
1029            (Item::Const(self0), Item::Const(other0)) => self0 == other0,
1030            (Item::Enum(self0), Item::Enum(other0)) => self0 == other0,
1031            (Item::ExternCrate(self0), Item::ExternCrate(other0)) => self0 == other0,
1032            (Item::Fn(self0), Item::Fn(other0)) => self0 == other0,
1033            (Item::ForeignMod(self0), Item::ForeignMod(other0)) => self0 == other0,
1034            (Item::Impl(self0), Item::Impl(other0)) => self0 == other0,
1035            (Item::Macro(self0), Item::Macro(other0)) => self0 == other0,
1036            (Item::Mod(self0), Item::Mod(other0)) => self0 == other0,
1037            (Item::Static(self0), Item::Static(other0)) => self0 == other0,
1038            (Item::Struct(self0), Item::Struct(other0)) => self0 == other0,
1039            (Item::Trait(self0), Item::Trait(other0)) => self0 == other0,
1040            (Item::TraitAlias(self0), Item::TraitAlias(other0)) => self0 == other0,
1041            (Item::Type(self0), Item::Type(other0)) => self0 == other0,
1042            (Item::Union(self0), Item::Union(other0)) => self0 == other0,
1043            (Item::Use(self0), Item::Use(other0)) => self0 == other0,
1044            (Item::Verbatim(self0), Item::Verbatim(other0)) => {
1045                TokenStreamHelper(self0) == TokenStreamHelper(other0)
1046            }
1047            _ => false,
1048        }
1049    }
1050}
1051#[cfg(feature = "full")]
1052#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1053impl Eq for ItemConst {}
1054#[cfg(feature = "full")]
1055#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1056impl PartialEq for ItemConst {
1057    fn eq(&self, other: &Self) -> bool {
1058        self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident
1059            && self.generics == other.generics && self.ty == other.ty
1060            && self.expr == other.expr
1061    }
1062}
1063#[cfg(feature = "full")]
1064#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1065impl Eq for ItemEnum {}
1066#[cfg(feature = "full")]
1067#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1068impl PartialEq for ItemEnum {
1069    fn eq(&self, other: &Self) -> bool {
1070        self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident
1071            && self.generics == other.generics && self.variants == other.variants
1072    }
1073}
1074#[cfg(feature = "full")]
1075#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1076impl Eq for ItemExternCrate {}
1077#[cfg(feature = "full")]
1078#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1079impl PartialEq for ItemExternCrate {
1080    fn eq(&self, other: &Self) -> bool {
1081        self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident
1082            && self.rename == other.rename
1083    }
1084}
1085#[cfg(feature = "full")]
1086#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1087impl Eq for ItemFn {}
1088#[cfg(feature = "full")]
1089#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1090impl PartialEq for ItemFn {
1091    fn eq(&self, other: &Self) -> bool {
1092        self.attrs == other.attrs && self.vis == other.vis && self.sig == other.sig
1093            && self.block == other.block
1094    }
1095}
1096#[cfg(feature = "full")]
1097#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1098impl Eq for ItemForeignMod {}
1099#[cfg(feature = "full")]
1100#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1101impl PartialEq for ItemForeignMod {
1102    fn eq(&self, other: &Self) -> bool {
1103        self.attrs == other.attrs && self.unsafety == other.unsafety
1104            && self.abi == other.abi && self.items == other.items
1105    }
1106}
1107#[cfg(feature = "full")]
1108#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1109impl Eq for ItemImpl {}
1110#[cfg(feature = "full")]
1111#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1112impl PartialEq for ItemImpl {
1113    fn eq(&self, other: &Self) -> bool {
1114        self.attrs == other.attrs && self.defaultness == other.defaultness
1115            && self.unsafety == other.unsafety && self.generics == other.generics
1116            && self.trait_ == other.trait_ && self.self_ty == other.self_ty
1117            && self.items == other.items
1118    }
1119}
1120#[cfg(feature = "full")]
1121#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1122impl Eq for ItemMacro {}
1123#[cfg(feature = "full")]
1124#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1125impl PartialEq for ItemMacro {
1126    fn eq(&self, other: &Self) -> bool {
1127        self.attrs == other.attrs && self.ident == other.ident && self.mac == other.mac
1128            && self.semi_token == other.semi_token
1129    }
1130}
1131#[cfg(feature = "full")]
1132#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1133impl Eq for ItemMod {}
1134#[cfg(feature = "full")]
1135#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1136impl PartialEq for ItemMod {
1137    fn eq(&self, other: &Self) -> bool {
1138        self.attrs == other.attrs && self.vis == other.vis
1139            && self.unsafety == other.unsafety && self.ident == other.ident
1140            && self.content == other.content && self.semi == other.semi
1141    }
1142}
1143#[cfg(feature = "full")]
1144#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1145impl Eq for ItemStatic {}
1146#[cfg(feature = "full")]
1147#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1148impl PartialEq for ItemStatic {
1149    fn eq(&self, other: &Self) -> bool {
1150        self.attrs == other.attrs && self.vis == other.vis
1151            && self.mutability == other.mutability && self.ident == other.ident
1152            && self.ty == other.ty && self.expr == other.expr
1153    }
1154}
1155#[cfg(feature = "full")]
1156#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1157impl Eq for ItemStruct {}
1158#[cfg(feature = "full")]
1159#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1160impl PartialEq for ItemStruct {
1161    fn eq(&self, other: &Self) -> bool {
1162        self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident
1163            && self.generics == other.generics && self.fields == other.fields
1164            && self.semi_token == other.semi_token
1165    }
1166}
1167#[cfg(feature = "full")]
1168#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1169impl Eq for ItemTrait {}
1170#[cfg(feature = "full")]
1171#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1172impl PartialEq for ItemTrait {
1173    fn eq(&self, other: &Self) -> bool {
1174        self.attrs == other.attrs && self.vis == other.vis
1175            && self.unsafety == other.unsafety && self.auto_token == other.auto_token
1176            && self.restriction == other.restriction && self.ident == other.ident
1177            && self.generics == other.generics && self.colon_token == other.colon_token
1178            && self.supertraits == other.supertraits && self.items == other.items
1179    }
1180}
1181#[cfg(feature = "full")]
1182#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1183impl Eq for ItemTraitAlias {}
1184#[cfg(feature = "full")]
1185#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1186impl PartialEq for ItemTraitAlias {
1187    fn eq(&self, other: &Self) -> bool {
1188        self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident
1189            && self.generics == other.generics && self.bounds == other.bounds
1190    }
1191}
1192#[cfg(feature = "full")]
1193#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1194impl Eq for ItemType {}
1195#[cfg(feature = "full")]
1196#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1197impl PartialEq for ItemType {
1198    fn eq(&self, other: &Self) -> bool {
1199        self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident
1200            && self.generics == other.generics && self.ty == other.ty
1201    }
1202}
1203#[cfg(feature = "full")]
1204#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1205impl Eq for ItemUnion {}
1206#[cfg(feature = "full")]
1207#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1208impl PartialEq for ItemUnion {
1209    fn eq(&self, other: &Self) -> bool {
1210        self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident
1211            && self.generics == other.generics && self.fields == other.fields
1212    }
1213}
1214#[cfg(feature = "full")]
1215#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1216impl Eq for ItemUse {}
1217#[cfg(feature = "full")]
1218#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1219impl PartialEq for ItemUse {
1220    fn eq(&self, other: &Self) -> bool {
1221        self.attrs == other.attrs && self.vis == other.vis
1222            && self.leading_colon == other.leading_colon && self.tree == other.tree
1223    }
1224}
1225#[cfg(feature = "full")]
1226#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1227impl Eq for Label {}
1228#[cfg(feature = "full")]
1229#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1230impl PartialEq for Label {
1231    fn eq(&self, other: &Self) -> bool {
1232        self.name == other.name
1233    }
1234}
1235#[cfg(any(feature = "derive", feature = "full"))]
1236#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1237impl Eq for LifetimeParam {}
1238#[cfg(any(feature = "derive", feature = "full"))]
1239#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1240impl PartialEq for LifetimeParam {
1241    fn eq(&self, other: &Self) -> bool {
1242        self.attrs == other.attrs && self.lifetime == other.lifetime
1243            && self.colon_token == other.colon_token && self.bounds == other.bounds
1244    }
1245}
1246#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1247impl Eq for Lit {}
1248#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1249impl PartialEq for Lit {
1250    fn eq(&self, other: &Self) -> bool {
1251        match (self, other) {
1252            (Lit::Str(self0), Lit::Str(other0)) => self0 == other0,
1253            (Lit::ByteStr(self0), Lit::ByteStr(other0)) => self0 == other0,
1254            (Lit::Byte(self0), Lit::Byte(other0)) => self0 == other0,
1255            (Lit::Char(self0), Lit::Char(other0)) => self0 == other0,
1256            (Lit::Int(self0), Lit::Int(other0)) => self0 == other0,
1257            (Lit::Float(self0), Lit::Float(other0)) => self0 == other0,
1258            (Lit::Bool(self0), Lit::Bool(other0)) => self0 == other0,
1259            (Lit::Verbatim(self0), Lit::Verbatim(other0)) => {
1260                self0.to_string() == other0.to_string()
1261            }
1262            _ => false,
1263        }
1264    }
1265}
1266#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1267impl Eq for LitBool {}
1268#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1269impl PartialEq for LitBool {
1270    fn eq(&self, other: &Self) -> bool {
1271        self.value == other.value
1272    }
1273}
1274#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1275impl Eq for LitByte {}
1276#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1277impl Eq for LitByteStr {}
1278#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1279impl Eq for LitChar {}
1280#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1281impl Eq for LitFloat {}
1282#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1283impl Eq for LitInt {}
1284#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1285impl Eq for LitStr {}
1286#[cfg(feature = "full")]
1287#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1288impl Eq for Local {}
1289#[cfg(feature = "full")]
1290#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1291impl PartialEq for Local {
1292    fn eq(&self, other: &Self) -> bool {
1293        self.attrs == other.attrs && self.pat == other.pat && self.init == other.init
1294    }
1295}
1296#[cfg(feature = "full")]
1297#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1298impl Eq for LocalInit {}
1299#[cfg(feature = "full")]
1300#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1301impl PartialEq for LocalInit {
1302    fn eq(&self, other: &Self) -> bool {
1303        self.expr == other.expr && self.diverge == other.diverge
1304    }
1305}
1306#[cfg(any(feature = "derive", feature = "full"))]
1307#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1308impl Eq for Macro {}
1309#[cfg(any(feature = "derive", feature = "full"))]
1310#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1311impl PartialEq for Macro {
1312    fn eq(&self, other: &Self) -> bool {
1313        self.path == other.path && self.delimiter == other.delimiter
1314            && TokenStreamHelper(&self.tokens) == TokenStreamHelper(&other.tokens)
1315    }
1316}
1317#[cfg(any(feature = "derive", feature = "full"))]
1318#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1319impl Eq for MacroDelimiter {}
1320#[cfg(any(feature = "derive", feature = "full"))]
1321#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1322impl PartialEq for MacroDelimiter {
1323    fn eq(&self, other: &Self) -> bool {
1324        match (self, other) {
1325            (MacroDelimiter::Paren(_), MacroDelimiter::Paren(_)) => true,
1326            (MacroDelimiter::Brace(_), MacroDelimiter::Brace(_)) => true,
1327            (MacroDelimiter::Bracket(_), MacroDelimiter::Bracket(_)) => true,
1328            _ => false,
1329        }
1330    }
1331}
1332#[cfg(any(feature = "derive", feature = "full"))]
1333#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1334impl Eq for Meta {}
1335#[cfg(any(feature = "derive", feature = "full"))]
1336#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1337impl PartialEq for Meta {
1338    fn eq(&self, other: &Self) -> bool {
1339        match (self, other) {
1340            (Meta::Path(self0), Meta::Path(other0)) => self0 == other0,
1341            (Meta::List(self0), Meta::List(other0)) => self0 == other0,
1342            (Meta::NameValue(self0), Meta::NameValue(other0)) => self0 == other0,
1343            _ => false,
1344        }
1345    }
1346}
1347#[cfg(any(feature = "derive", feature = "full"))]
1348#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1349impl Eq for MetaList {}
1350#[cfg(any(feature = "derive", feature = "full"))]
1351#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1352impl PartialEq for MetaList {
1353    fn eq(&self, other: &Self) -> bool {
1354        self.path == other.path && self.delimiter == other.delimiter
1355            && TokenStreamHelper(&self.tokens) == TokenStreamHelper(&other.tokens)
1356    }
1357}
1358#[cfg(any(feature = "derive", feature = "full"))]
1359#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1360impl Eq for MetaNameValue {}
1361#[cfg(any(feature = "derive", feature = "full"))]
1362#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1363impl PartialEq for MetaNameValue {
1364    fn eq(&self, other: &Self) -> bool {
1365        self.path == other.path && self.value == other.value
1366    }
1367}
1368#[cfg(any(feature = "derive", feature = "full"))]
1369#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1370impl Eq for ParenthesizedGenericArguments {}
1371#[cfg(any(feature = "derive", feature = "full"))]
1372#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1373impl PartialEq for ParenthesizedGenericArguments {
1374    fn eq(&self, other: &Self) -> bool {
1375        self.inputs == other.inputs && self.output == other.output
1376    }
1377}
1378#[cfg(feature = "full")]
1379#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1380impl Eq for Pat {}
1381#[cfg(feature = "full")]
1382#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1383impl PartialEq for Pat {
1384    fn eq(&self, other: &Self) -> bool {
1385        match (self, other) {
1386            (Pat::Const(self0), Pat::Const(other0)) => self0 == other0,
1387            (Pat::Ident(self0), Pat::Ident(other0)) => self0 == other0,
1388            (Pat::Lit(self0), Pat::Lit(other0)) => self0 == other0,
1389            (Pat::Macro(self0), Pat::Macro(other0)) => self0 == other0,
1390            (Pat::Or(self0), Pat::Or(other0)) => self0 == other0,
1391            (Pat::Paren(self0), Pat::Paren(other0)) => self0 == other0,
1392            (Pat::Path(self0), Pat::Path(other0)) => self0 == other0,
1393            (Pat::Range(self0), Pat::Range(other0)) => self0 == other0,
1394            (Pat::Reference(self0), Pat::Reference(other0)) => self0 == other0,
1395            (Pat::Rest(self0), Pat::Rest(other0)) => self0 == other0,
1396            (Pat::Slice(self0), Pat::Slice(other0)) => self0 == other0,
1397            (Pat::Struct(self0), Pat::Struct(other0)) => self0 == other0,
1398            (Pat::Tuple(self0), Pat::Tuple(other0)) => self0 == other0,
1399            (Pat::TupleStruct(self0), Pat::TupleStruct(other0)) => self0 == other0,
1400            (Pat::Type(self0), Pat::Type(other0)) => self0 == other0,
1401            (Pat::Verbatim(self0), Pat::Verbatim(other0)) => {
1402                TokenStreamHelper(self0) == TokenStreamHelper(other0)
1403            }
1404            (Pat::Wild(self0), Pat::Wild(other0)) => self0 == other0,
1405            _ => false,
1406        }
1407    }
1408}
1409#[cfg(feature = "full")]
1410#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1411impl Eq for PatIdent {}
1412#[cfg(feature = "full")]
1413#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1414impl PartialEq for PatIdent {
1415    fn eq(&self, other: &Self) -> bool {
1416        self.attrs == other.attrs && self.by_ref == other.by_ref
1417            && self.mutability == other.mutability && self.ident == other.ident
1418            && self.subpat == other.subpat
1419    }
1420}
1421#[cfg(feature = "full")]
1422#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1423impl Eq for PatOr {}
1424#[cfg(feature = "full")]
1425#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1426impl PartialEq for PatOr {
1427    fn eq(&self, other: &Self) -> bool {
1428        self.attrs == other.attrs && self.leading_vert == other.leading_vert
1429            && self.cases == other.cases
1430    }
1431}
1432#[cfg(feature = "full")]
1433#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1434impl Eq for PatParen {}
1435#[cfg(feature = "full")]
1436#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1437impl PartialEq for PatParen {
1438    fn eq(&self, other: &Self) -> bool {
1439        self.attrs == other.attrs && self.pat == other.pat
1440    }
1441}
1442#[cfg(feature = "full")]
1443#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1444impl Eq for PatReference {}
1445#[cfg(feature = "full")]
1446#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1447impl PartialEq for PatReference {
1448    fn eq(&self, other: &Self) -> bool {
1449        self.attrs == other.attrs && self.mutability == other.mutability
1450            && self.pat == other.pat
1451    }
1452}
1453#[cfg(feature = "full")]
1454#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1455impl Eq for PatRest {}
1456#[cfg(feature = "full")]
1457#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1458impl PartialEq for PatRest {
1459    fn eq(&self, other: &Self) -> bool {
1460        self.attrs == other.attrs
1461    }
1462}
1463#[cfg(feature = "full")]
1464#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1465impl Eq for PatSlice {}
1466#[cfg(feature = "full")]
1467#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1468impl PartialEq for PatSlice {
1469    fn eq(&self, other: &Self) -> bool {
1470        self.attrs == other.attrs && self.elems == other.elems
1471    }
1472}
1473#[cfg(feature = "full")]
1474#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1475impl Eq for PatStruct {}
1476#[cfg(feature = "full")]
1477#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1478impl PartialEq for PatStruct {
1479    fn eq(&self, other: &Self) -> bool {
1480        self.attrs == other.attrs && self.qself == other.qself && self.path == other.path
1481            && self.fields == other.fields && self.rest == other.rest
1482    }
1483}
1484#[cfg(feature = "full")]
1485#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1486impl Eq for PatTuple {}
1487#[cfg(feature = "full")]
1488#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1489impl PartialEq for PatTuple {
1490    fn eq(&self, other: &Self) -> bool {
1491        self.attrs == other.attrs && self.elems == other.elems
1492    }
1493}
1494#[cfg(feature = "full")]
1495#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1496impl Eq for PatTupleStruct {}
1497#[cfg(feature = "full")]
1498#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1499impl PartialEq for PatTupleStruct {
1500    fn eq(&self, other: &Self) -> bool {
1501        self.attrs == other.attrs && self.qself == other.qself && self.path == other.path
1502            && self.elems == other.elems
1503    }
1504}
1505#[cfg(feature = "full")]
1506#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1507impl Eq for PatType {}
1508#[cfg(feature = "full")]
1509#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1510impl PartialEq for PatType {
1511    fn eq(&self, other: &Self) -> bool {
1512        self.attrs == other.attrs && self.pat == other.pat && self.ty == other.ty
1513    }
1514}
1515#[cfg(feature = "full")]
1516#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1517impl Eq for PatWild {}
1518#[cfg(feature = "full")]
1519#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1520impl PartialEq for PatWild {
1521    fn eq(&self, other: &Self) -> bool {
1522        self.attrs == other.attrs
1523    }
1524}
1525#[cfg(any(feature = "derive", feature = "full"))]
1526#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1527impl Eq for Path {}
1528#[cfg(any(feature = "derive", feature = "full"))]
1529#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1530impl PartialEq for Path {
1531    fn eq(&self, other: &Self) -> bool {
1532        self.leading_colon == other.leading_colon && self.segments == other.segments
1533    }
1534}
1535#[cfg(any(feature = "derive", feature = "full"))]
1536#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1537impl Eq for PathArguments {}
1538#[cfg(any(feature = "derive", feature = "full"))]
1539#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1540impl PartialEq for PathArguments {
1541    fn eq(&self, other: &Self) -> bool {
1542        match (self, other) {
1543            (PathArguments::None, PathArguments::None) => true,
1544            (
1545                PathArguments::AngleBracketed(self0),
1546                PathArguments::AngleBracketed(other0),
1547            ) => self0 == other0,
1548            (
1549                PathArguments::Parenthesized(self0),
1550                PathArguments::Parenthesized(other0),
1551            ) => self0 == other0,
1552            _ => false,
1553        }
1554    }
1555}
1556#[cfg(any(feature = "derive", feature = "full"))]
1557#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1558impl Eq for PathSegment {}
1559#[cfg(any(feature = "derive", feature = "full"))]
1560#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1561impl PartialEq for PathSegment {
1562    fn eq(&self, other: &Self) -> bool {
1563        self.ident == other.ident && self.arguments == other.arguments
1564    }
1565}
1566#[cfg(any(feature = "derive", feature = "full"))]
1567#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1568impl Eq for PredicateLifetime {}
1569#[cfg(any(feature = "derive", feature = "full"))]
1570#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1571impl PartialEq for PredicateLifetime {
1572    fn eq(&self, other: &Self) -> bool {
1573        self.lifetime == other.lifetime && self.bounds == other.bounds
1574    }
1575}
1576#[cfg(any(feature = "derive", feature = "full"))]
1577#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1578impl Eq for PredicateType {}
1579#[cfg(any(feature = "derive", feature = "full"))]
1580#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1581impl PartialEq for PredicateType {
1582    fn eq(&self, other: &Self) -> bool {
1583        self.lifetimes == other.lifetimes && self.bounded_ty == other.bounded_ty
1584            && self.bounds == other.bounds
1585    }
1586}
1587#[cfg(any(feature = "derive", feature = "full"))]
1588#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1589impl Eq for QSelf {}
1590#[cfg(any(feature = "derive", feature = "full"))]
1591#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1592impl PartialEq for QSelf {
1593    fn eq(&self, other: &Self) -> bool {
1594        self.ty == other.ty && self.position == other.position
1595            && self.as_token == other.as_token
1596    }
1597}
1598#[cfg(feature = "full")]
1599#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1600impl Eq for RangeLimits {}
1601#[cfg(feature = "full")]
1602#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1603impl PartialEq for RangeLimits {
1604    fn eq(&self, other: &Self) -> bool {
1605        match (self, other) {
1606            (RangeLimits::HalfOpen(_), RangeLimits::HalfOpen(_)) => true,
1607            (RangeLimits::Closed(_), RangeLimits::Closed(_)) => true,
1608            _ => false,
1609        }
1610    }
1611}
1612#[cfg(feature = "full")]
1613#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1614impl Eq for Receiver {}
1615#[cfg(feature = "full")]
1616#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1617impl PartialEq for Receiver {
1618    fn eq(&self, other: &Self) -> bool {
1619        self.attrs == other.attrs && self.reference == other.reference
1620            && self.mutability == other.mutability
1621            && self.colon_token == other.colon_token && self.ty == other.ty
1622    }
1623}
1624#[cfg(any(feature = "derive", feature = "full"))]
1625#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1626impl Eq for ReturnType {}
1627#[cfg(any(feature = "derive", feature = "full"))]
1628#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1629impl PartialEq for ReturnType {
1630    fn eq(&self, other: &Self) -> bool {
1631        match (self, other) {
1632            (ReturnType::Default, ReturnType::Default) => true,
1633            (ReturnType::Type(_, self1), ReturnType::Type(_, other1)) => self1 == other1,
1634            _ => false,
1635        }
1636    }
1637}
1638#[cfg(feature = "full")]
1639#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1640impl Eq for Signature {}
1641#[cfg(feature = "full")]
1642#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1643impl PartialEq for Signature {
1644    fn eq(&self, other: &Self) -> bool {
1645        self.constness == other.constness && self.asyncness == other.asyncness
1646            && self.unsafety == other.unsafety && self.abi == other.abi
1647            && self.ident == other.ident && self.generics == other.generics
1648            && self.inputs == other.inputs && self.variadic == other.variadic
1649            && self.output == other.output
1650    }
1651}
1652#[cfg(feature = "full")]
1653#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1654impl Eq for StaticMutability {}
1655#[cfg(feature = "full")]
1656#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1657impl PartialEq for StaticMutability {
1658    fn eq(&self, other: &Self) -> bool {
1659        match (self, other) {
1660            (StaticMutability::Mut(_), StaticMutability::Mut(_)) => true,
1661            (StaticMutability::None, StaticMutability::None) => true,
1662            _ => false,
1663        }
1664    }
1665}
1666#[cfg(feature = "full")]
1667#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1668impl Eq for Stmt {}
1669#[cfg(feature = "full")]
1670#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1671impl PartialEq for Stmt {
1672    fn eq(&self, other: &Self) -> bool {
1673        match (self, other) {
1674            (Stmt::Local(self0), Stmt::Local(other0)) => self0 == other0,
1675            (Stmt::Item(self0), Stmt::Item(other0)) => self0 == other0,
1676            (Stmt::Expr(self0, self1), Stmt::Expr(other0, other1)) => {
1677                self0 == other0 && self1 == other1
1678            }
1679            (Stmt::Macro(self0), Stmt::Macro(other0)) => self0 == other0,
1680            _ => false,
1681        }
1682    }
1683}
1684#[cfg(feature = "full")]
1685#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1686impl Eq for StmtMacro {}
1687#[cfg(feature = "full")]
1688#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1689impl PartialEq for StmtMacro {
1690    fn eq(&self, other: &Self) -> bool {
1691        self.attrs == other.attrs && self.mac == other.mac
1692            && self.semi_token == other.semi_token
1693    }
1694}
1695#[cfg(any(feature = "derive", feature = "full"))]
1696#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1697impl Eq for TraitBound {}
1698#[cfg(any(feature = "derive", feature = "full"))]
1699#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1700impl PartialEq for TraitBound {
1701    fn eq(&self, other: &Self) -> bool {
1702        self.paren_token == other.paren_token && self.modifier == other.modifier
1703            && self.lifetimes == other.lifetimes && self.path == other.path
1704    }
1705}
1706#[cfg(any(feature = "derive", feature = "full"))]
1707#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1708impl Eq for TraitBoundModifier {}
1709#[cfg(any(feature = "derive", feature = "full"))]
1710#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1711impl PartialEq for TraitBoundModifier {
1712    fn eq(&self, other: &Self) -> bool {
1713        match (self, other) {
1714            (TraitBoundModifier::None, TraitBoundModifier::None) => true,
1715            (TraitBoundModifier::Maybe(_), TraitBoundModifier::Maybe(_)) => true,
1716            _ => false,
1717        }
1718    }
1719}
1720#[cfg(feature = "full")]
1721#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1722impl Eq for TraitItem {}
1723#[cfg(feature = "full")]
1724#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1725impl PartialEq for TraitItem {
1726    fn eq(&self, other: &Self) -> bool {
1727        match (self, other) {
1728            (TraitItem::Const(self0), TraitItem::Const(other0)) => self0 == other0,
1729            (TraitItem::Fn(self0), TraitItem::Fn(other0)) => self0 == other0,
1730            (TraitItem::Type(self0), TraitItem::Type(other0)) => self0 == other0,
1731            (TraitItem::Macro(self0), TraitItem::Macro(other0)) => self0 == other0,
1732            (TraitItem::Verbatim(self0), TraitItem::Verbatim(other0)) => {
1733                TokenStreamHelper(self0) == TokenStreamHelper(other0)
1734            }
1735            _ => false,
1736        }
1737    }
1738}
1739#[cfg(feature = "full")]
1740#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1741impl Eq for TraitItemConst {}
1742#[cfg(feature = "full")]
1743#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1744impl PartialEq for TraitItemConst {
1745    fn eq(&self, other: &Self) -> bool {
1746        self.attrs == other.attrs && self.ident == other.ident
1747            && self.generics == other.generics && self.ty == other.ty
1748            && self.default == other.default
1749    }
1750}
1751#[cfg(feature = "full")]
1752#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1753impl Eq for TraitItemFn {}
1754#[cfg(feature = "full")]
1755#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1756impl PartialEq for TraitItemFn {
1757    fn eq(&self, other: &Self) -> bool {
1758        self.attrs == other.attrs && self.sig == other.sig
1759            && self.default == other.default && self.semi_token == other.semi_token
1760    }
1761}
1762#[cfg(feature = "full")]
1763#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1764impl Eq for TraitItemMacro {}
1765#[cfg(feature = "full")]
1766#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1767impl PartialEq for TraitItemMacro {
1768    fn eq(&self, other: &Self) -> bool {
1769        self.attrs == other.attrs && self.mac == other.mac
1770            && self.semi_token == other.semi_token
1771    }
1772}
1773#[cfg(feature = "full")]
1774#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1775impl Eq for TraitItemType {}
1776#[cfg(feature = "full")]
1777#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1778impl PartialEq for TraitItemType {
1779    fn eq(&self, other: &Self) -> bool {
1780        self.attrs == other.attrs && self.ident == other.ident
1781            && self.generics == other.generics && self.colon_token == other.colon_token
1782            && self.bounds == other.bounds && self.default == other.default
1783    }
1784}
1785#[cfg(any(feature = "derive", feature = "full"))]
1786#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1787impl Eq for Type {}
1788#[cfg(any(feature = "derive", feature = "full"))]
1789#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1790impl PartialEq for Type {
1791    fn eq(&self, other: &Self) -> bool {
1792        match (self, other) {
1793            (Type::Array(self0), Type::Array(other0)) => self0 == other0,
1794            (Type::BareFn(self0), Type::BareFn(other0)) => self0 == other0,
1795            (Type::Group(self0), Type::Group(other0)) => self0 == other0,
1796            (Type::ImplTrait(self0), Type::ImplTrait(other0)) => self0 == other0,
1797            (Type::Infer(self0), Type::Infer(other0)) => self0 == other0,
1798            (Type::Macro(self0), Type::Macro(other0)) => self0 == other0,
1799            (Type::Never(self0), Type::Never(other0)) => self0 == other0,
1800            (Type::Paren(self0), Type::Paren(other0)) => self0 == other0,
1801            (Type::Path(self0), Type::Path(other0)) => self0 == other0,
1802            (Type::Ptr(self0), Type::Ptr(other0)) => self0 == other0,
1803            (Type::Reference(self0), Type::Reference(other0)) => self0 == other0,
1804            (Type::Slice(self0), Type::Slice(other0)) => self0 == other0,
1805            (Type::TraitObject(self0), Type::TraitObject(other0)) => self0 == other0,
1806            (Type::Tuple(self0), Type::Tuple(other0)) => self0 == other0,
1807            (Type::Verbatim(self0), Type::Verbatim(other0)) => {
1808                TokenStreamHelper(self0) == TokenStreamHelper(other0)
1809            }
1810            _ => false,
1811        }
1812    }
1813}
1814#[cfg(any(feature = "derive", feature = "full"))]
1815#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1816impl Eq for TypeArray {}
1817#[cfg(any(feature = "derive", feature = "full"))]
1818#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1819impl PartialEq for TypeArray {
1820    fn eq(&self, other: &Self) -> bool {
1821        self.elem == other.elem && self.len == other.len
1822    }
1823}
1824#[cfg(any(feature = "derive", feature = "full"))]
1825#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1826impl Eq for TypeBareFn {}
1827#[cfg(any(feature = "derive", feature = "full"))]
1828#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1829impl PartialEq for TypeBareFn {
1830    fn eq(&self, other: &Self) -> bool {
1831        self.lifetimes == other.lifetimes && self.unsafety == other.unsafety
1832            && self.abi == other.abi && self.inputs == other.inputs
1833            && self.variadic == other.variadic && self.output == other.output
1834    }
1835}
1836#[cfg(any(feature = "derive", feature = "full"))]
1837#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1838impl Eq for TypeGroup {}
1839#[cfg(any(feature = "derive", feature = "full"))]
1840#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1841impl PartialEq for TypeGroup {
1842    fn eq(&self, other: &Self) -> bool {
1843        self.elem == other.elem
1844    }
1845}
1846#[cfg(any(feature = "derive", feature = "full"))]
1847#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1848impl Eq for TypeImplTrait {}
1849#[cfg(any(feature = "derive", feature = "full"))]
1850#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1851impl PartialEq for TypeImplTrait {
1852    fn eq(&self, other: &Self) -> bool {
1853        self.bounds == other.bounds
1854    }
1855}
1856#[cfg(any(feature = "derive", feature = "full"))]
1857#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1858impl Eq for TypeInfer {}
1859#[cfg(any(feature = "derive", feature = "full"))]
1860#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1861impl PartialEq for TypeInfer {
1862    fn eq(&self, _other: &Self) -> bool {
1863        true
1864    }
1865}
1866#[cfg(any(feature = "derive", feature = "full"))]
1867#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1868impl Eq for TypeMacro {}
1869#[cfg(any(feature = "derive", feature = "full"))]
1870#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1871impl PartialEq for TypeMacro {
1872    fn eq(&self, other: &Self) -> bool {
1873        self.mac == other.mac
1874    }
1875}
1876#[cfg(any(feature = "derive", feature = "full"))]
1877#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1878impl Eq for TypeNever {}
1879#[cfg(any(feature = "derive", feature = "full"))]
1880#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1881impl PartialEq for TypeNever {
1882    fn eq(&self, _other: &Self) -> bool {
1883        true
1884    }
1885}
1886#[cfg(any(feature = "derive", feature = "full"))]
1887#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1888impl Eq for TypeParam {}
1889#[cfg(any(feature = "derive", feature = "full"))]
1890#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1891impl PartialEq for TypeParam {
1892    fn eq(&self, other: &Self) -> bool {
1893        self.attrs == other.attrs && self.ident == other.ident
1894            && self.colon_token == other.colon_token && self.bounds == other.bounds
1895            && self.eq_token == other.eq_token && self.default == other.default
1896    }
1897}
1898#[cfg(any(feature = "derive", feature = "full"))]
1899#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1900impl Eq for TypeParamBound {}
1901#[cfg(any(feature = "derive", feature = "full"))]
1902#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1903impl PartialEq for TypeParamBound {
1904    fn eq(&self, other: &Self) -> bool {
1905        match (self, other) {
1906            (TypeParamBound::Trait(self0), TypeParamBound::Trait(other0)) => {
1907                self0 == other0
1908            }
1909            (TypeParamBound::Lifetime(self0), TypeParamBound::Lifetime(other0)) => {
1910                self0 == other0
1911            }
1912            (TypeParamBound::Verbatim(self0), TypeParamBound::Verbatim(other0)) => {
1913                TokenStreamHelper(self0) == TokenStreamHelper(other0)
1914            }
1915            _ => false,
1916        }
1917    }
1918}
1919#[cfg(any(feature = "derive", feature = "full"))]
1920#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1921impl Eq for TypeParen {}
1922#[cfg(any(feature = "derive", feature = "full"))]
1923#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1924impl PartialEq for TypeParen {
1925    fn eq(&self, other: &Self) -> bool {
1926        self.elem == other.elem
1927    }
1928}
1929#[cfg(any(feature = "derive", feature = "full"))]
1930#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1931impl Eq for TypePath {}
1932#[cfg(any(feature = "derive", feature = "full"))]
1933#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1934impl PartialEq for TypePath {
1935    fn eq(&self, other: &Self) -> bool {
1936        self.qself == other.qself && self.path == other.path
1937    }
1938}
1939#[cfg(any(feature = "derive", feature = "full"))]
1940#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1941impl Eq for TypePtr {}
1942#[cfg(any(feature = "derive", feature = "full"))]
1943#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1944impl PartialEq for TypePtr {
1945    fn eq(&self, other: &Self) -> bool {
1946        self.const_token == other.const_token && self.mutability == other.mutability
1947            && self.elem == other.elem
1948    }
1949}
1950#[cfg(any(feature = "derive", feature = "full"))]
1951#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1952impl Eq for TypeReference {}
1953#[cfg(any(feature = "derive", feature = "full"))]
1954#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1955impl PartialEq for TypeReference {
1956    fn eq(&self, other: &Self) -> bool {
1957        self.lifetime == other.lifetime && self.mutability == other.mutability
1958            && self.elem == other.elem
1959    }
1960}
1961#[cfg(any(feature = "derive", feature = "full"))]
1962#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1963impl Eq for TypeSlice {}
1964#[cfg(any(feature = "derive", feature = "full"))]
1965#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1966impl PartialEq for TypeSlice {
1967    fn eq(&self, other: &Self) -> bool {
1968        self.elem == other.elem
1969    }
1970}
1971#[cfg(any(feature = "derive", feature = "full"))]
1972#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1973impl Eq for TypeTraitObject {}
1974#[cfg(any(feature = "derive", feature = "full"))]
1975#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1976impl PartialEq for TypeTraitObject {
1977    fn eq(&self, other: &Self) -> bool {
1978        self.dyn_token == other.dyn_token && self.bounds == other.bounds
1979    }
1980}
1981#[cfg(any(feature = "derive", feature = "full"))]
1982#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1983impl Eq for TypeTuple {}
1984#[cfg(any(feature = "derive", feature = "full"))]
1985#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1986impl PartialEq for TypeTuple {
1987    fn eq(&self, other: &Self) -> bool {
1988        self.elems == other.elems
1989    }
1990}
1991#[cfg(any(feature = "derive", feature = "full"))]
1992#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1993impl Eq for UnOp {}
1994#[cfg(any(feature = "derive", feature = "full"))]
1995#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
1996impl PartialEq for UnOp {
1997    fn eq(&self, other: &Self) -> bool {
1998        match (self, other) {
1999            (UnOp::Deref(_), UnOp::Deref(_)) => true,
2000            (UnOp::Not(_), UnOp::Not(_)) => true,
2001            (UnOp::Neg(_), UnOp::Neg(_)) => true,
2002            _ => false,
2003        }
2004    }
2005}
2006#[cfg(feature = "full")]
2007#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2008impl Eq for UseGlob {}
2009#[cfg(feature = "full")]
2010#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2011impl PartialEq for UseGlob {
2012    fn eq(&self, _other: &Self) -> bool {
2013        true
2014    }
2015}
2016#[cfg(feature = "full")]
2017#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2018impl Eq for UseGroup {}
2019#[cfg(feature = "full")]
2020#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2021impl PartialEq for UseGroup {
2022    fn eq(&self, other: &Self) -> bool {
2023        self.items == other.items
2024    }
2025}
2026#[cfg(feature = "full")]
2027#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2028impl Eq for UseName {}
2029#[cfg(feature = "full")]
2030#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2031impl PartialEq for UseName {
2032    fn eq(&self, other: &Self) -> bool {
2033        self.ident == other.ident
2034    }
2035}
2036#[cfg(feature = "full")]
2037#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2038impl Eq for UsePath {}
2039#[cfg(feature = "full")]
2040#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2041impl PartialEq for UsePath {
2042    fn eq(&self, other: &Self) -> bool {
2043        self.ident == other.ident && self.tree == other.tree
2044    }
2045}
2046#[cfg(feature = "full")]
2047#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2048impl Eq for UseRename {}
2049#[cfg(feature = "full")]
2050#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2051impl PartialEq for UseRename {
2052    fn eq(&self, other: &Self) -> bool {
2053        self.ident == other.ident && self.rename == other.rename
2054    }
2055}
2056#[cfg(feature = "full")]
2057#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2058impl Eq for UseTree {}
2059#[cfg(feature = "full")]
2060#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2061impl PartialEq for UseTree {
2062    fn eq(&self, other: &Self) -> bool {
2063        match (self, other) {
2064            (UseTree::Path(self0), UseTree::Path(other0)) => self0 == other0,
2065            (UseTree::Name(self0), UseTree::Name(other0)) => self0 == other0,
2066            (UseTree::Rename(self0), UseTree::Rename(other0)) => self0 == other0,
2067            (UseTree::Glob(self0), UseTree::Glob(other0)) => self0 == other0,
2068            (UseTree::Group(self0), UseTree::Group(other0)) => self0 == other0,
2069            _ => false,
2070        }
2071    }
2072}
2073#[cfg(feature = "full")]
2074#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2075impl Eq for Variadic {}
2076#[cfg(feature = "full")]
2077#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2078impl PartialEq for Variadic {
2079    fn eq(&self, other: &Self) -> bool {
2080        self.attrs == other.attrs && self.pat == other.pat && self.comma == other.comma
2081    }
2082}
2083#[cfg(any(feature = "derive", feature = "full"))]
2084#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2085impl Eq for Variant {}
2086#[cfg(any(feature = "derive", feature = "full"))]
2087#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2088impl PartialEq for Variant {
2089    fn eq(&self, other: &Self) -> bool {
2090        self.attrs == other.attrs && self.ident == other.ident
2091            && self.fields == other.fields && self.discriminant == other.discriminant
2092    }
2093}
2094#[cfg(any(feature = "derive", feature = "full"))]
2095#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2096impl Eq for VisRestricted {}
2097#[cfg(any(feature = "derive", feature = "full"))]
2098#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2099impl PartialEq for VisRestricted {
2100    fn eq(&self, other: &Self) -> bool {
2101        self.in_token == other.in_token && self.path == other.path
2102    }
2103}
2104#[cfg(any(feature = "derive", feature = "full"))]
2105#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2106impl Eq for Visibility {}
2107#[cfg(any(feature = "derive", feature = "full"))]
2108#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2109impl PartialEq for Visibility {
2110    fn eq(&self, other: &Self) -> bool {
2111        match (self, other) {
2112            (Visibility::Public(_), Visibility::Public(_)) => true,
2113            (Visibility::Restricted(self0), Visibility::Restricted(other0)) => {
2114                self0 == other0
2115            }
2116            (Visibility::Inherited, Visibility::Inherited) => true,
2117            _ => false,
2118        }
2119    }
2120}
2121#[cfg(any(feature = "derive", feature = "full"))]
2122#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2123impl Eq for WhereClause {}
2124#[cfg(any(feature = "derive", feature = "full"))]
2125#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2126impl PartialEq for WhereClause {
2127    fn eq(&self, other: &Self) -> bool {
2128        self.predicates == other.predicates
2129    }
2130}
2131#[cfg(any(feature = "derive", feature = "full"))]
2132#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2133impl Eq for WherePredicate {}
2134#[cfg(any(feature = "derive", feature = "full"))]
2135#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
2136impl PartialEq for WherePredicate {
2137    fn eq(&self, other: &Self) -> bool {
2138        match (self, other) {
2139            (WherePredicate::Lifetime(self0), WherePredicate::Lifetime(other0)) => {
2140                self0 == other0
2141            }
2142            (WherePredicate::Type(self0), WherePredicate::Type(other0)) => {
2143                self0 == other0
2144            }
2145            _ => false,
2146        }
2147    }
2148}
2149