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