1#[cfg(any(feature = "derive", feature = "full"))]
5use crate::tt::TokenStreamHelper;
6#[cfg(feature = "extra-traits")]
7use alloc::string::ToString;
8use core::hash::{Hash, Hasher};
9#[cfg(any(feature = "derive", feature = "full"))]
10#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
11impl Hash for crate::Abi {
12 fn hash<H>(&self, state: &mut H)
13 where
14 H: Hasher,
15 {
16 self.name.hash(state);
17 }
18}
19#[cfg(any(feature = "derive", feature = "full"))]
20#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
21impl Hash for crate::AngleBracketedGenericArguments {
22 fn hash<H>(&self, state: &mut H)
23 where
24 H: Hasher,
25 {
26 self.colon2_token.hash(state);
27 self.args.hash(state);
28 }
29}
30#[cfg(feature = "full")]
31#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
32impl Hash for crate::Arm {
33 fn hash<H>(&self, state: &mut H)
34 where
35 H: Hasher,
36 {
37 self.attrs.hash(state);
38 self.pat.hash(state);
39 self.body.hash(state);
40 self.comma.hash(state);
41 }
42}
43#[cfg(any(feature = "derive", feature = "full"))]
44#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
45impl Hash for crate::AssocConst {
46 fn hash<H>(&self, state: &mut H)
47 where
48 H: Hasher,
49 {
50 self.ident.hash(state);
51 self.generics.hash(state);
52 self.value.hash(state);
53 }
54}
55#[cfg(any(feature = "derive", feature = "full"))]
56#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
57impl Hash for crate::AssocType {
58 fn hash<H>(&self, state: &mut H)
59 where
60 H: Hasher,
61 {
62 self.ident.hash(state);
63 self.generics.hash(state);
64 self.ty.hash(state);
65 }
66}
67#[cfg(any(feature = "derive", feature = "full"))]
68#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
69impl Hash for crate::AttrStyle {
70 fn hash<H>(&self, state: &mut H)
71 where
72 H: Hasher,
73 {
74 match self {
75 crate::AttrStyle::Outer => {
76 state.write_u8(0u8);
77 }
78 crate::AttrStyle::Inner(_) => {
79 state.write_u8(1u8);
80 }
81 }
82 }
83}
84#[cfg(any(feature = "derive", feature = "full"))]
85#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
86impl Hash for crate::Attribute {
87 fn hash<H>(&self, state: &mut H)
88 where
89 H: Hasher,
90 {
91 self.style.hash(state);
92 self.meta.hash(state);
93 }
94}
95#[cfg(any(feature = "derive", feature = "full"))]
96#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
97impl Hash for crate::BinOp {
98 fn hash<H>(&self, state: &mut H)
99 where
100 H: Hasher,
101 {
102 match self {
103 crate::BinOp::Add(_) => {
104 state.write_u8(0u8);
105 }
106 crate::BinOp::Sub(_) => {
107 state.write_u8(1u8);
108 }
109 crate::BinOp::Mul(_) => {
110 state.write_u8(2u8);
111 }
112 crate::BinOp::Div(_) => {
113 state.write_u8(3u8);
114 }
115 crate::BinOp::Rem(_) => {
116 state.write_u8(4u8);
117 }
118 crate::BinOp::And(_) => {
119 state.write_u8(5u8);
120 }
121 crate::BinOp::Or(_) => {
122 state.write_u8(6u8);
123 }
124 crate::BinOp::BitXor(_) => {
125 state.write_u8(7u8);
126 }
127 crate::BinOp::BitAnd(_) => {
128 state.write_u8(8u8);
129 }
130 crate::BinOp::BitOr(_) => {
131 state.write_u8(9u8);
132 }
133 crate::BinOp::Shl(_) => {
134 state.write_u8(10u8);
135 }
136 crate::BinOp::Shr(_) => {
137 state.write_u8(11u8);
138 }
139 crate::BinOp::Eq(_) => {
140 state.write_u8(12u8);
141 }
142 crate::BinOp::Lt(_) => {
143 state.write_u8(13u8);
144 }
145 crate::BinOp::Le(_) => {
146 state.write_u8(14u8);
147 }
148 crate::BinOp::Ne(_) => {
149 state.write_u8(15u8);
150 }
151 crate::BinOp::Ge(_) => {
152 state.write_u8(16u8);
153 }
154 crate::BinOp::Gt(_) => {
155 state.write_u8(17u8);
156 }
157 crate::BinOp::AddAssign(_) => {
158 state.write_u8(18u8);
159 }
160 crate::BinOp::SubAssign(_) => {
161 state.write_u8(19u8);
162 }
163 crate::BinOp::MulAssign(_) => {
164 state.write_u8(20u8);
165 }
166 crate::BinOp::DivAssign(_) => {
167 state.write_u8(21u8);
168 }
169 crate::BinOp::RemAssign(_) => {
170 state.write_u8(22u8);
171 }
172 crate::BinOp::BitXorAssign(_) => {
173 state.write_u8(23u8);
174 }
175 crate::BinOp::BitAndAssign(_) => {
176 state.write_u8(24u8);
177 }
178 crate::BinOp::BitOrAssign(_) => {
179 state.write_u8(25u8);
180 }
181 crate::BinOp::ShlAssign(_) => {
182 state.write_u8(26u8);
183 }
184 crate::BinOp::ShrAssign(_) => {
185 state.write_u8(27u8);
186 }
187 }
188 }
189}
190#[cfg(feature = "full")]
191#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
192impl Hash for crate::Block {
193 fn hash<H>(&self, state: &mut H)
194 where
195 H: Hasher,
196 {
197 self.stmts.hash(state);
198 }
199}
200#[cfg(feature = "full")]
201#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
202impl Hash for crate::BlockModifiers {
203 fn hash<H>(&self, _state: &mut H)
204 where
205 H: Hasher,
206 {}
207}
208#[cfg(any(feature = "derive", feature = "full"))]
209#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
210impl Hash for crate::BoundLifetimes {
211 fn hash<H>(&self, state: &mut H)
212 where
213 H: Hasher,
214 {
215 self.lifetimes.hash(state);
216 }
217}
218#[cfg(feature = "full")]
219#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
220impl Hash for crate::CapturedParam {
221 fn hash<H>(&self, state: &mut H)
222 where
223 H: Hasher,
224 {
225 match self {
226 crate::CapturedParam::Lifetime(v0) => {
227 state.write_u8(0u8);
228 v0.hash(state);
229 }
230 crate::CapturedParam::Ident(v0) => {
231 state.write_u8(1u8);
232 v0.hash(state);
233 }
234 }
235 }
236}
237#[cfg(feature = "full")]
238#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
239impl Hash for crate::ClosureModifiers {
240 fn hash<H>(&self, _state: &mut H)
241 where
242 H: Hasher,
243 {}
244}
245#[cfg(feature = "full")]
246#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
247impl Hash for crate::ConstModifiers {
248 fn hash<H>(&self, state: &mut H)
249 where
250 H: Hasher,
251 {
252 self.defaultness.hash(state);
253 }
254}
255#[cfg(any(feature = "derive", feature = "full"))]
256#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
257impl Hash for crate::ConstParam {
258 fn hash<H>(&self, state: &mut H)
259 where
260 H: Hasher,
261 {
262 self.attrs.hash(state);
263 self.ident.hash(state);
264 self.ty.hash(state);
265 self.default.hash(state);
266 }
267}
268#[cfg(any(feature = "derive", feature = "full"))]
269#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
270impl Hash for crate::Constraint {
271 fn hash<H>(&self, state: &mut H)
272 where
273 H: Hasher,
274 {
275 self.ident.hash(state);
276 self.generics.hash(state);
277 self.bounds.hash(state);
278 }
279}
280#[cfg(feature = "derive")]
281#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
282impl Hash for crate::Data {
283 fn hash<H>(&self, state: &mut H)
284 where
285 H: Hasher,
286 {
287 match self {
288 crate::Data::Struct(v0) => {
289 state.write_u8(0u8);
290 v0.hash(state);
291 }
292 crate::Data::Enum(v0) => {
293 state.write_u8(1u8);
294 v0.hash(state);
295 }
296 crate::Data::Union(v0) => {
297 state.write_u8(2u8);
298 v0.hash(state);
299 }
300 }
301 }
302}
303#[cfg(feature = "derive")]
304#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
305impl Hash for crate::DataEnum {
306 fn hash<H>(&self, state: &mut H)
307 where
308 H: Hasher,
309 {
310 self.variants.hash(state);
311 }
312}
313#[cfg(feature = "derive")]
314#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
315impl Hash for crate::DataStruct {
316 fn hash<H>(&self, state: &mut H)
317 where
318 H: Hasher,
319 {
320 self.fields.hash(state);
321 self.semi_token.hash(state);
322 }
323}
324#[cfg(feature = "derive")]
325#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
326impl Hash for crate::DataUnion {
327 fn hash<H>(&self, state: &mut H)
328 where
329 H: Hasher,
330 {
331 self.fields.hash(state);
332 }
333}
334#[cfg(feature = "derive")]
335#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
336impl Hash for crate::DeriveInput {
337 fn hash<H>(&self, state: &mut H)
338 where
339 H: Hasher,
340 {
341 self.attrs.hash(state);
342 self.vis.hash(state);
343 self.ident.hash(state);
344 self.generics.hash(state);
345 self.data.hash(state);
346 }
347}
348#[cfg(any(feature = "derive", feature = "full"))]
349#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
350impl Hash for crate::Expr {
351 fn hash<H>(&self, state: &mut H)
352 where
353 H: Hasher,
354 {
355 match self {
356 #[cfg(feature = "full")]
357 crate::Expr::Array(v0) => {
358 state.write_u8(0u8);
359 v0.hash(state);
360 }
361 #[cfg(feature = "full")]
362 crate::Expr::Assign(v0) => {
363 state.write_u8(1u8);
364 v0.hash(state);
365 }
366 #[cfg(feature = "full")]
367 crate::Expr::Async(v0) => {
368 state.write_u8(2u8);
369 v0.hash(state);
370 }
371 #[cfg(feature = "full")]
372 crate::Expr::Await(v0) => {
373 state.write_u8(3u8);
374 v0.hash(state);
375 }
376 crate::Expr::Binary(v0) => {
377 state.write_u8(4u8);
378 v0.hash(state);
379 }
380 #[cfg(feature = "full")]
381 crate::Expr::Block(v0) => {
382 state.write_u8(5u8);
383 v0.hash(state);
384 }
385 #[cfg(feature = "full")]
386 crate::Expr::Break(v0) => {
387 state.write_u8(6u8);
388 v0.hash(state);
389 }
390 crate::Expr::Call(v0) => {
391 state.write_u8(7u8);
392 v0.hash(state);
393 }
394 crate::Expr::Cast(v0) => {
395 state.write_u8(8u8);
396 v0.hash(state);
397 }
398 #[cfg(feature = "full")]
399 crate::Expr::Closure(v0) => {
400 state.write_u8(9u8);
401 v0.hash(state);
402 }
403 #[cfg(feature = "full")]
404 crate::Expr::Const(v0) => {
405 state.write_u8(10u8);
406 v0.hash(state);
407 }
408 #[cfg(feature = "full")]
409 crate::Expr::Continue(v0) => {
410 state.write_u8(11u8);
411 v0.hash(state);
412 }
413 crate::Expr::Field(v0) => {
414 state.write_u8(12u8);
415 v0.hash(state);
416 }
417 #[cfg(feature = "full")]
418 crate::Expr::ForLoop(v0) => {
419 state.write_u8(13u8);
420 v0.hash(state);
421 }
422 crate::Expr::Group(v0) => {
423 state.write_u8(14u8);
424 v0.hash(state);
425 }
426 #[cfg(feature = "full")]
427 crate::Expr::If(v0) => {
428 state.write_u8(15u8);
429 v0.hash(state);
430 }
431 crate::Expr::Index(v0) => {
432 state.write_u8(16u8);
433 v0.hash(state);
434 }
435 #[cfg(feature = "full")]
436 crate::Expr::Infer(v0) => {
437 state.write_u8(17u8);
438 v0.hash(state);
439 }
440 #[cfg(feature = "full")]
441 crate::Expr::Let(v0) => {
442 state.write_u8(18u8);
443 v0.hash(state);
444 }
445 crate::Expr::Lit(v0) => {
446 state.write_u8(19u8);
447 v0.hash(state);
448 }
449 #[cfg(feature = "full")]
450 crate::Expr::Loop(v0) => {
451 state.write_u8(20u8);
452 v0.hash(state);
453 }
454 crate::Expr::Macro(v0) => {
455 state.write_u8(21u8);
456 v0.hash(state);
457 }
458 #[cfg(feature = "full")]
459 crate::Expr::Match(v0) => {
460 state.write_u8(22u8);
461 v0.hash(state);
462 }
463 crate::Expr::MethodCall(v0) => {
464 state.write_u8(23u8);
465 v0.hash(state);
466 }
467 crate::Expr::Paren(v0) => {
468 state.write_u8(24u8);
469 v0.hash(state);
470 }
471 crate::Expr::Path(v0) => {
472 state.write_u8(25u8);
473 v0.hash(state);
474 }
475 #[cfg(feature = "full")]
476 crate::Expr::Range(v0) => {
477 state.write_u8(26u8);
478 v0.hash(state);
479 }
480 #[cfg(feature = "full")]
481 crate::Expr::RawAddr(v0) => {
482 state.write_u8(27u8);
483 v0.hash(state);
484 }
485 crate::Expr::Reference(v0) => {
486 state.write_u8(28u8);
487 v0.hash(state);
488 }
489 #[cfg(feature = "full")]
490 crate::Expr::Repeat(v0) => {
491 state.write_u8(29u8);
492 v0.hash(state);
493 }
494 #[cfg(feature = "full")]
495 crate::Expr::Return(v0) => {
496 state.write_u8(30u8);
497 v0.hash(state);
498 }
499 crate::Expr::Struct(v0) => {
500 state.write_u8(31u8);
501 v0.hash(state);
502 }
503 #[cfg(feature = "full")]
504 crate::Expr::Try(v0) => {
505 state.write_u8(32u8);
506 v0.hash(state);
507 }
508 #[cfg(feature = "full")]
509 crate::Expr::TryBlock(v0) => {
510 state.write_u8(33u8);
511 v0.hash(state);
512 }
513 crate::Expr::Tuple(v0) => {
514 state.write_u8(34u8);
515 v0.hash(state);
516 }
517 crate::Expr::Unary(v0) => {
518 state.write_u8(35u8);
519 v0.hash(state);
520 }
521 #[cfg(feature = "full")]
522 crate::Expr::Unsafe(v0) => {
523 state.write_u8(36u8);
524 v0.hash(state);
525 }
526 crate::Expr::Verbatim(v0) => {
527 state.write_u8(37u8);
528 TokenStreamHelper(v0).hash(state);
529 }
530 #[cfg(feature = "full")]
531 crate::Expr::While(v0) => {
532 state.write_u8(38u8);
533 v0.hash(state);
534 }
535 #[cfg(feature = "full")]
536 crate::Expr::Yield(v0) => {
537 state.write_u8(39u8);
538 v0.hash(state);
539 }
540 #[cfg(not(feature = "full"))]
541 _ => unreachable!(),
542 }
543 }
544}
545#[cfg(feature = "full")]
546#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
547impl Hash for crate::ExprArray {
548 fn hash<H>(&self, state: &mut H)
549 where
550 H: Hasher,
551 {
552 self.attrs.hash(state);
553 self.elems.hash(state);
554 }
555}
556#[cfg(feature = "full")]
557#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
558impl Hash for crate::ExprAssign {
559 fn hash<H>(&self, state: &mut H)
560 where
561 H: Hasher,
562 {
563 self.attrs.hash(state);
564 self.left.hash(state);
565 self.right.hash(state);
566 }
567}
568#[cfg(feature = "full")]
569#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
570impl Hash for crate::ExprAsync {
571 fn hash<H>(&self, state: &mut H)
572 where
573 H: Hasher,
574 {
575 self.attrs.hash(state);
576 self.capture.hash(state);
577 self.modifiers.hash(state);
578 self.block.hash(state);
579 }
580}
581#[cfg(feature = "full")]
582#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
583impl Hash for crate::ExprAwait {
584 fn hash<H>(&self, state: &mut H)
585 where
586 H: Hasher,
587 {
588 self.attrs.hash(state);
589 self.base.hash(state);
590 }
591}
592#[cfg(any(feature = "derive", feature = "full"))]
593#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
594impl Hash for crate::ExprBinary {
595 fn hash<H>(&self, state: &mut H)
596 where
597 H: Hasher,
598 {
599 self.attrs.hash(state);
600 self.left.hash(state);
601 self.op.hash(state);
602 self.right.hash(state);
603 }
604}
605#[cfg(feature = "full")]
606#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
607impl Hash for crate::ExprBlock {
608 fn hash<H>(&self, state: &mut H)
609 where
610 H: Hasher,
611 {
612 self.attrs.hash(state);
613 self.label.hash(state);
614 self.block.hash(state);
615 }
616}
617#[cfg(feature = "full")]
618#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
619impl Hash for crate::ExprBreak {
620 fn hash<H>(&self, state: &mut H)
621 where
622 H: Hasher,
623 {
624 self.attrs.hash(state);
625 self.label.hash(state);
626 self.expr.hash(state);
627 }
628}
629#[cfg(any(feature = "derive", feature = "full"))]
630#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
631impl Hash for crate::ExprCall {
632 fn hash<H>(&self, state: &mut H)
633 where
634 H: Hasher,
635 {
636 self.attrs.hash(state);
637 self.func.hash(state);
638 self.args.hash(state);
639 }
640}
641#[cfg(any(feature = "derive", feature = "full"))]
642#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
643impl Hash for crate::ExprCast {
644 fn hash<H>(&self, state: &mut H)
645 where
646 H: Hasher,
647 {
648 self.attrs.hash(state);
649 self.expr.hash(state);
650 self.ty.hash(state);
651 }
652}
653#[cfg(feature = "full")]
654#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
655impl Hash for crate::ExprClosure {
656 fn hash<H>(&self, state: &mut H)
657 where
658 H: Hasher,
659 {
660 self.attrs.hash(state);
661 self.lifetimes.hash(state);
662 self.modifiers.hash(state);
663 self.constness.hash(state);
664 self.asyncness.hash(state);
665 self.capture.hash(state);
666 self.inputs.hash(state);
667 self.output.hash(state);
668 self.body.hash(state);
669 }
670}
671#[cfg(feature = "full")]
672#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
673impl Hash for crate::ExprConst {
674 fn hash<H>(&self, state: &mut H)
675 where
676 H: Hasher,
677 {
678 self.attrs.hash(state);
679 self.modifiers.hash(state);
680 self.block.hash(state);
681 }
682}
683#[cfg(feature = "full")]
684#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
685impl Hash for crate::ExprContinue {
686 fn hash<H>(&self, state: &mut H)
687 where
688 H: Hasher,
689 {
690 self.attrs.hash(state);
691 self.label.hash(state);
692 }
693}
694#[cfg(any(feature = "derive", feature = "full"))]
695#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
696impl Hash for crate::ExprField {
697 fn hash<H>(&self, state: &mut H)
698 where
699 H: Hasher,
700 {
701 self.attrs.hash(state);
702 self.base.hash(state);
703 self.member.hash(state);
704 }
705}
706#[cfg(feature = "full")]
707#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
708impl Hash for crate::ExprForLoop {
709 fn hash<H>(&self, state: &mut H)
710 where
711 H: Hasher,
712 {
713 self.attrs.hash(state);
714 self.label.hash(state);
715 self.pat.hash(state);
716 self.expr.hash(state);
717 self.body.hash(state);
718 }
719}
720#[cfg(any(feature = "derive", feature = "full"))]
721#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
722impl Hash for crate::ExprGroup {
723 fn hash<H>(&self, state: &mut H)
724 where
725 H: Hasher,
726 {
727 self.attrs.hash(state);
728 self.expr.hash(state);
729 }
730}
731#[cfg(feature = "full")]
732#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
733impl Hash for crate::ExprIf {
734 fn hash<H>(&self, state: &mut H)
735 where
736 H: Hasher,
737 {
738 self.attrs.hash(state);
739 self.cond.hash(state);
740 self.then_branch.hash(state);
741 self.else_branch.hash(state);
742 }
743}
744#[cfg(any(feature = "derive", feature = "full"))]
745#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
746impl Hash for crate::ExprIndex {
747 fn hash<H>(&self, state: &mut H)
748 where
749 H: Hasher,
750 {
751 self.attrs.hash(state);
752 self.expr.hash(state);
753 self.index.hash(state);
754 }
755}
756#[cfg(feature = "full")]
757#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
758impl Hash for crate::ExprInfer {
759 fn hash<H>(&self, state: &mut H)
760 where
761 H: Hasher,
762 {
763 self.attrs.hash(state);
764 }
765}
766#[cfg(feature = "full")]
767#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
768impl Hash for crate::ExprLet {
769 fn hash<H>(&self, state: &mut H)
770 where
771 H: Hasher,
772 {
773 self.attrs.hash(state);
774 self.pat.hash(state);
775 self.expr.hash(state);
776 }
777}
778#[cfg(any(feature = "derive", feature = "full"))]
779#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
780impl Hash for crate::ExprLit {
781 fn hash<H>(&self, state: &mut H)
782 where
783 H: Hasher,
784 {
785 self.attrs.hash(state);
786 self.lit.hash(state);
787 }
788}
789#[cfg(feature = "full")]
790#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
791impl Hash for crate::ExprLoop {
792 fn hash<H>(&self, state: &mut H)
793 where
794 H: Hasher,
795 {
796 self.attrs.hash(state);
797 self.label.hash(state);
798 self.body.hash(state);
799 }
800}
801#[cfg(any(feature = "derive", feature = "full"))]
802#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
803impl Hash for crate::ExprMacro {
804 fn hash<H>(&self, state: &mut H)
805 where
806 H: Hasher,
807 {
808 self.attrs.hash(state);
809 self.mac.hash(state);
810 }
811}
812#[cfg(feature = "full")]
813#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
814impl Hash for crate::ExprMatch {
815 fn hash<H>(&self, state: &mut H)
816 where
817 H: Hasher,
818 {
819 self.attrs.hash(state);
820 self.expr.hash(state);
821 self.arms.hash(state);
822 }
823}
824#[cfg(any(feature = "derive", feature = "full"))]
825#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
826impl Hash for crate::ExprMethodCall {
827 fn hash<H>(&self, state: &mut H)
828 where
829 H: Hasher,
830 {
831 self.attrs.hash(state);
832 self.receiver.hash(state);
833 self.method.hash(state);
834 self.turbofish.hash(state);
835 self.args.hash(state);
836 }
837}
838#[cfg(any(feature = "derive", feature = "full"))]
839#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
840impl Hash for crate::ExprParen {
841 fn hash<H>(&self, state: &mut H)
842 where
843 H: Hasher,
844 {
845 self.attrs.hash(state);
846 self.expr.hash(state);
847 }
848}
849#[cfg(any(feature = "derive", feature = "full"))]
850#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
851impl Hash for crate::ExprPath {
852 fn hash<H>(&self, state: &mut H)
853 where
854 H: Hasher,
855 {
856 self.attrs.hash(state);
857 self.qself.hash(state);
858 self.path.hash(state);
859 }
860}
861#[cfg(feature = "full")]
862#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
863impl Hash for crate::ExprRange {
864 fn hash<H>(&self, state: &mut H)
865 where
866 H: Hasher,
867 {
868 self.attrs.hash(state);
869 self.start.hash(state);
870 self.limits.hash(state);
871 self.end.hash(state);
872 }
873}
874#[cfg(feature = "full")]
875#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
876impl Hash for crate::ExprRawAddr {
877 fn hash<H>(&self, state: &mut H)
878 where
879 H: Hasher,
880 {
881 self.attrs.hash(state);
882 self.mutability.hash(state);
883 self.expr.hash(state);
884 }
885}
886#[cfg(any(feature = "derive", feature = "full"))]
887#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
888impl Hash for crate::ExprReference {
889 fn hash<H>(&self, state: &mut H)
890 where
891 H: Hasher,
892 {
893 self.attrs.hash(state);
894 self.mutability.hash(state);
895 self.expr.hash(state);
896 }
897}
898#[cfg(feature = "full")]
899#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
900impl Hash for crate::ExprRepeat {
901 fn hash<H>(&self, state: &mut H)
902 where
903 H: Hasher,
904 {
905 self.attrs.hash(state);
906 self.expr.hash(state);
907 self.len.hash(state);
908 }
909}
910#[cfg(feature = "full")]
911#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
912impl Hash for crate::ExprReturn {
913 fn hash<H>(&self, state: &mut H)
914 where
915 H: Hasher,
916 {
917 self.attrs.hash(state);
918 self.expr.hash(state);
919 }
920}
921#[cfg(any(feature = "derive", feature = "full"))]
922#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
923impl Hash for crate::ExprStruct {
924 fn hash<H>(&self, state: &mut H)
925 where
926 H: Hasher,
927 {
928 self.attrs.hash(state);
929 self.qself.hash(state);
930 self.path.hash(state);
931 self.fields.hash(state);
932 self.dot2_token.hash(state);
933 self.rest.hash(state);
934 }
935}
936#[cfg(feature = "full")]
937#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
938impl Hash for crate::ExprTry {
939 fn hash<H>(&self, state: &mut H)
940 where
941 H: Hasher,
942 {
943 self.attrs.hash(state);
944 self.expr.hash(state);
945 }
946}
947#[cfg(feature = "full")]
948#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
949impl Hash for crate::ExprTryBlock {
950 fn hash<H>(&self, state: &mut H)
951 where
952 H: Hasher,
953 {
954 self.attrs.hash(state);
955 self.modifiers.hash(state);
956 self.block.hash(state);
957 }
958}
959#[cfg(any(feature = "derive", feature = "full"))]
960#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
961impl Hash for crate::ExprTuple {
962 fn hash<H>(&self, state: &mut H)
963 where
964 H: Hasher,
965 {
966 self.attrs.hash(state);
967 self.elems.hash(state);
968 }
969}
970#[cfg(any(feature = "derive", feature = "full"))]
971#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
972impl Hash for crate::ExprUnary {
973 fn hash<H>(&self, state: &mut H)
974 where
975 H: Hasher,
976 {
977 self.attrs.hash(state);
978 self.op.hash(state);
979 self.expr.hash(state);
980 }
981}
982#[cfg(feature = "full")]
983#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
984impl Hash for crate::ExprUnsafe {
985 fn hash<H>(&self, state: &mut H)
986 where
987 H: Hasher,
988 {
989 self.attrs.hash(state);
990 self.block.hash(state);
991 }
992}
993#[cfg(feature = "full")]
994#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
995impl Hash for crate::ExprWhile {
996 fn hash<H>(&self, state: &mut H)
997 where
998 H: Hasher,
999 {
1000 self.attrs.hash(state);
1001 self.label.hash(state);
1002 self.cond.hash(state);
1003 self.body.hash(state);
1004 }
1005}
1006#[cfg(feature = "full")]
1007#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1008impl Hash for crate::ExprYield {
1009 fn hash<H>(&self, state: &mut H)
1010 where
1011 H: Hasher,
1012 {
1013 self.attrs.hash(state);
1014 self.expr.hash(state);
1015 }
1016}
1017#[cfg(any(feature = "derive", feature = "full"))]
1018#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1019impl Hash for crate::Field {
1020 fn hash<H>(&self, state: &mut H)
1021 where
1022 H: Hasher,
1023 {
1024 self.attrs.hash(state);
1025 self.vis.hash(state);
1026 self.modifiers.hash(state);
1027 self.ident.hash(state);
1028 self.colon_token.hash(state);
1029 self.ty.hash(state);
1030 self.default.hash(state);
1031 }
1032}
1033#[cfg(any(feature = "derive", feature = "full"))]
1034#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1035impl Hash for crate::FieldModifiers {
1036 fn hash<H>(&self, _state: &mut H)
1037 where
1038 H: Hasher,
1039 {}
1040}
1041#[cfg(feature = "full")]
1042#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1043impl Hash for crate::FieldPat {
1044 fn hash<H>(&self, state: &mut H)
1045 where
1046 H: Hasher,
1047 {
1048 self.attrs.hash(state);
1049 self.member.hash(state);
1050 self.colon_token.hash(state);
1051 self.pat.hash(state);
1052 }
1053}
1054#[cfg(any(feature = "derive", feature = "full"))]
1055#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1056impl Hash for crate::FieldValue {
1057 fn hash<H>(&self, state: &mut H)
1058 where
1059 H: Hasher,
1060 {
1061 self.attrs.hash(state);
1062 self.member.hash(state);
1063 self.colon_token.hash(state);
1064 self.expr.hash(state);
1065 }
1066}
1067#[cfg(any(feature = "derive", feature = "full"))]
1068#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1069impl Hash for crate::Fields {
1070 fn hash<H>(&self, state: &mut H)
1071 where
1072 H: Hasher,
1073 {
1074 match self {
1075 crate::Fields::Named(v0) => {
1076 state.write_u8(0u8);
1077 v0.hash(state);
1078 }
1079 crate::Fields::Unnamed(v0) => {
1080 state.write_u8(1u8);
1081 v0.hash(state);
1082 }
1083 crate::Fields::Unit => {
1084 state.write_u8(2u8);
1085 }
1086 }
1087 }
1088}
1089#[cfg(any(feature = "derive", feature = "full"))]
1090#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1091impl Hash for crate::FieldsNamed {
1092 fn hash<H>(&self, state: &mut H)
1093 where
1094 H: Hasher,
1095 {
1096 self.named.hash(state);
1097 }
1098}
1099#[cfg(any(feature = "derive", feature = "full"))]
1100#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1101impl Hash for crate::FieldsUnnamed {
1102 fn hash<H>(&self, state: &mut H)
1103 where
1104 H: Hasher,
1105 {
1106 self.unnamed.hash(state);
1107 }
1108}
1109#[cfg(feature = "full")]
1110#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1111impl Hash for crate::File {
1112 fn hash<H>(&self, state: &mut H)
1113 where
1114 H: Hasher,
1115 {
1116 self.shebang.hash(state);
1117 self.frontmatter.hash(state);
1118 self.attrs.hash(state);
1119 self.items.hash(state);
1120 }
1121}
1122#[cfg(feature = "full")]
1123#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1124impl Hash for crate::FnArg {
1125 fn hash<H>(&self, state: &mut H)
1126 where
1127 H: Hasher,
1128 {
1129 match self {
1130 crate::FnArg::Receiver(v0) => {
1131 state.write_u8(0u8);
1132 v0.hash(state);
1133 }
1134 crate::FnArg::Typed(v0) => {
1135 state.write_u8(1u8);
1136 v0.hash(state);
1137 }
1138 }
1139 }
1140}
1141#[cfg(feature = "full")]
1142#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1143impl Hash for crate::FnModifiers {
1144 fn hash<H>(&self, state: &mut H)
1145 where
1146 H: Hasher,
1147 {
1148 self.defaultness.hash(state);
1149 }
1150}
1151#[cfg(any(feature = "derive", feature = "full"))]
1152#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1153impl Hash for crate::FnPtrVariadic {
1154 fn hash<H>(&self, state: &mut H)
1155 where
1156 H: Hasher,
1157 {
1158 self.attrs.hash(state);
1159 self.name.hash(state);
1160 self.comma.hash(state);
1161 }
1162}
1163#[cfg(feature = "full")]
1164#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1165impl Hash for crate::ForeignItem {
1166 fn hash<H>(&self, state: &mut H)
1167 where
1168 H: Hasher,
1169 {
1170 match self {
1171 crate::ForeignItem::Fn(v0) => {
1172 state.write_u8(0u8);
1173 v0.hash(state);
1174 }
1175 crate::ForeignItem::Static(v0) => {
1176 state.write_u8(1u8);
1177 v0.hash(state);
1178 }
1179 crate::ForeignItem::Type(v0) => {
1180 state.write_u8(2u8);
1181 v0.hash(state);
1182 }
1183 crate::ForeignItem::Macro(v0) => {
1184 state.write_u8(3u8);
1185 v0.hash(state);
1186 }
1187 crate::ForeignItem::Verbatim(v0) => {
1188 state.write_u8(4u8);
1189 TokenStreamHelper(v0).hash(state);
1190 }
1191 }
1192 }
1193}
1194#[cfg(feature = "full")]
1195#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1196impl Hash for crate::ForeignItemFn {
1197 fn hash<H>(&self, state: &mut H)
1198 where
1199 H: Hasher,
1200 {
1201 self.attrs.hash(state);
1202 self.vis.hash(state);
1203 self.modifiers.hash(state);
1204 self.sig.hash(state);
1205 }
1206}
1207#[cfg(feature = "full")]
1208#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1209impl Hash for crate::ForeignItemMacro {
1210 fn hash<H>(&self, state: &mut H)
1211 where
1212 H: Hasher,
1213 {
1214 self.attrs.hash(state);
1215 self.mac.hash(state);
1216 self.semi_token.hash(state);
1217 }
1218}
1219#[cfg(feature = "full")]
1220#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1221impl Hash for crate::ForeignItemStatic {
1222 fn hash<H>(&self, state: &mut H)
1223 where
1224 H: Hasher,
1225 {
1226 self.attrs.hash(state);
1227 self.vis.hash(state);
1228 self.safety.hash(state);
1229 self.mutability.hash(state);
1230 self.ident.hash(state);
1231 self.ty.hash(state);
1232 }
1233}
1234#[cfg(feature = "full")]
1235#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1236impl Hash for crate::ForeignItemType {
1237 fn hash<H>(&self, state: &mut H)
1238 where
1239 H: Hasher,
1240 {
1241 self.attrs.hash(state);
1242 self.vis.hash(state);
1243 self.modifiers.hash(state);
1244 self.ident.hash(state);
1245 self.generics.hash(state);
1246 }
1247}
1248#[cfg(feature = "full")]
1249#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1250impl Hash for crate::Frontmatter {
1251 fn hash<H>(&self, _state: &mut H)
1252 where
1253 H: Hasher,
1254 {}
1255}
1256#[cfg(any(feature = "derive", feature = "full"))]
1257#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1258impl Hash for crate::GenericArgument {
1259 fn hash<H>(&self, state: &mut H)
1260 where
1261 H: Hasher,
1262 {
1263 match self {
1264 crate::GenericArgument::Lifetime(v0) => {
1265 state.write_u8(0u8);
1266 v0.hash(state);
1267 }
1268 crate::GenericArgument::Type(v0) => {
1269 state.write_u8(1u8);
1270 v0.hash(state);
1271 }
1272 crate::GenericArgument::Const(v0) => {
1273 state.write_u8(2u8);
1274 v0.hash(state);
1275 }
1276 crate::GenericArgument::AssocType(v0) => {
1277 state.write_u8(3u8);
1278 v0.hash(state);
1279 }
1280 crate::GenericArgument::AssocConst(v0) => {
1281 state.write_u8(4u8);
1282 v0.hash(state);
1283 }
1284 crate::GenericArgument::Constraint(v0) => {
1285 state.write_u8(5u8);
1286 v0.hash(state);
1287 }
1288 }
1289 }
1290}
1291#[cfg(any(feature = "derive", feature = "full"))]
1292#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1293impl Hash for crate::GenericParam {
1294 fn hash<H>(&self, state: &mut H)
1295 where
1296 H: Hasher,
1297 {
1298 match self {
1299 crate::GenericParam::Lifetime(v0) => {
1300 state.write_u8(0u8);
1301 v0.hash(state);
1302 }
1303 crate::GenericParam::Type(v0) => {
1304 state.write_u8(1u8);
1305 v0.hash(state);
1306 }
1307 crate::GenericParam::Const(v0) => {
1308 state.write_u8(2u8);
1309 v0.hash(state);
1310 }
1311 }
1312 }
1313}
1314#[cfg(any(feature = "derive", feature = "full"))]
1315#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1316impl Hash for crate::Generics {
1317 fn hash<H>(&self, state: &mut H)
1318 where
1319 H: Hasher,
1320 {
1321 self.lt_token.hash(state);
1322 self.params.hash(state);
1323 self.gt_token.hash(state);
1324 self.where_clause.hash(state);
1325 }
1326}
1327#[cfg(feature = "full")]
1328#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1329impl Hash for crate::ImplItem {
1330 fn hash<H>(&self, state: &mut H)
1331 where
1332 H: Hasher,
1333 {
1334 match self {
1335 crate::ImplItem::Const(v0) => {
1336 state.write_u8(0u8);
1337 v0.hash(state);
1338 }
1339 crate::ImplItem::Fn(v0) => {
1340 state.write_u8(1u8);
1341 v0.hash(state);
1342 }
1343 crate::ImplItem::Type(v0) => {
1344 state.write_u8(2u8);
1345 v0.hash(state);
1346 }
1347 crate::ImplItem::Macro(v0) => {
1348 state.write_u8(3u8);
1349 v0.hash(state);
1350 }
1351 crate::ImplItem::Verbatim(v0) => {
1352 state.write_u8(4u8);
1353 TokenStreamHelper(v0).hash(state);
1354 }
1355 }
1356 }
1357}
1358#[cfg(feature = "full")]
1359#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1360impl Hash for crate::ImplItemConst {
1361 fn hash<H>(&self, state: &mut H)
1362 where
1363 H: Hasher,
1364 {
1365 self.attrs.hash(state);
1366 self.vis.hash(state);
1367 self.modifiers.hash(state);
1368 self.ident.hash(state);
1369 self.generics.hash(state);
1370 self.ty.hash(state);
1371 self.expr.hash(state);
1372 }
1373}
1374#[cfg(feature = "full")]
1375#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1376impl Hash for crate::ImplItemFn {
1377 fn hash<H>(&self, state: &mut H)
1378 where
1379 H: Hasher,
1380 {
1381 self.attrs.hash(state);
1382 self.vis.hash(state);
1383 self.modifiers.hash(state);
1384 self.sig.hash(state);
1385 self.block.hash(state);
1386 }
1387}
1388#[cfg(feature = "full")]
1389#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1390impl Hash for crate::ImplItemMacro {
1391 fn hash<H>(&self, state: &mut H)
1392 where
1393 H: Hasher,
1394 {
1395 self.attrs.hash(state);
1396 self.mac.hash(state);
1397 self.semi_token.hash(state);
1398 }
1399}
1400#[cfg(feature = "full")]
1401#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1402impl Hash for crate::ImplItemType {
1403 fn hash<H>(&self, state: &mut H)
1404 where
1405 H: Hasher,
1406 {
1407 self.attrs.hash(state);
1408 self.vis.hash(state);
1409 self.modifiers.hash(state);
1410 self.ident.hash(state);
1411 self.generics.hash(state);
1412 self.ty.hash(state);
1413 }
1414}
1415#[cfg(feature = "full")]
1416#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1417impl Hash for crate::ImplModifiers {
1418 fn hash<H>(&self, state: &mut H)
1419 where
1420 H: Hasher,
1421 {
1422 self.defaultness.hash(state);
1423 self.polarity.hash(state);
1424 }
1425}
1426#[cfg(feature = "full")]
1427#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1428impl Hash for crate::Item {
1429 fn hash<H>(&self, state: &mut H)
1430 where
1431 H: Hasher,
1432 {
1433 match self {
1434 crate::Item::Const(v0) => {
1435 state.write_u8(0u8);
1436 v0.hash(state);
1437 }
1438 crate::Item::Enum(v0) => {
1439 state.write_u8(1u8);
1440 v0.hash(state);
1441 }
1442 crate::Item::ExternCrate(v0) => {
1443 state.write_u8(2u8);
1444 v0.hash(state);
1445 }
1446 crate::Item::Fn(v0) => {
1447 state.write_u8(3u8);
1448 v0.hash(state);
1449 }
1450 crate::Item::ForeignMod(v0) => {
1451 state.write_u8(4u8);
1452 v0.hash(state);
1453 }
1454 crate::Item::Impl(v0) => {
1455 state.write_u8(5u8);
1456 v0.hash(state);
1457 }
1458 crate::Item::Macro(v0) => {
1459 state.write_u8(6u8);
1460 v0.hash(state);
1461 }
1462 crate::Item::Mod(v0) => {
1463 state.write_u8(7u8);
1464 v0.hash(state);
1465 }
1466 crate::Item::Static(v0) => {
1467 state.write_u8(8u8);
1468 v0.hash(state);
1469 }
1470 crate::Item::Struct(v0) => {
1471 state.write_u8(9u8);
1472 v0.hash(state);
1473 }
1474 crate::Item::Trait(v0) => {
1475 state.write_u8(10u8);
1476 v0.hash(state);
1477 }
1478 crate::Item::TraitAlias(v0) => {
1479 state.write_u8(11u8);
1480 v0.hash(state);
1481 }
1482 crate::Item::Type(v0) => {
1483 state.write_u8(12u8);
1484 v0.hash(state);
1485 }
1486 crate::Item::Union(v0) => {
1487 state.write_u8(13u8);
1488 v0.hash(state);
1489 }
1490 crate::Item::Use(v0) => {
1491 state.write_u8(14u8);
1492 v0.hash(state);
1493 }
1494 crate::Item::Verbatim(v0) => {
1495 state.write_u8(15u8);
1496 TokenStreamHelper(v0).hash(state);
1497 }
1498 }
1499 }
1500}
1501#[cfg(feature = "full")]
1502#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1503impl Hash for crate::ItemConst {
1504 fn hash<H>(&self, state: &mut H)
1505 where
1506 H: Hasher,
1507 {
1508 self.attrs.hash(state);
1509 self.vis.hash(state);
1510 self.modifiers.hash(state);
1511 self.ident.hash(state);
1512 self.generics.hash(state);
1513 self.ty.hash(state);
1514 self.expr.hash(state);
1515 }
1516}
1517#[cfg(feature = "full")]
1518#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1519impl Hash for crate::ItemEnum {
1520 fn hash<H>(&self, state: &mut H)
1521 where
1522 H: Hasher,
1523 {
1524 self.attrs.hash(state);
1525 self.vis.hash(state);
1526 self.ident.hash(state);
1527 self.generics.hash(state);
1528 self.variants.hash(state);
1529 }
1530}
1531#[cfg(feature = "full")]
1532#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1533impl Hash for crate::ItemExternCrate {
1534 fn hash<H>(&self, state: &mut H)
1535 where
1536 H: Hasher,
1537 {
1538 self.attrs.hash(state);
1539 self.vis.hash(state);
1540 self.ident.hash(state);
1541 self.rename.hash(state);
1542 }
1543}
1544#[cfg(feature = "full")]
1545#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1546impl Hash for crate::ItemFn {
1547 fn hash<H>(&self, state: &mut H)
1548 where
1549 H: Hasher,
1550 {
1551 self.attrs.hash(state);
1552 self.vis.hash(state);
1553 self.modifiers.hash(state);
1554 self.sig.hash(state);
1555 self.block.hash(state);
1556 }
1557}
1558#[cfg(feature = "full")]
1559#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1560impl Hash for crate::ItemForeignMod {
1561 fn hash<H>(&self, state: &mut H)
1562 where
1563 H: Hasher,
1564 {
1565 self.attrs.hash(state);
1566 self.unsafety.hash(state);
1567 self.abi.hash(state);
1568 self.items.hash(state);
1569 }
1570}
1571#[cfg(feature = "full")]
1572#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1573impl Hash for crate::ItemImpl {
1574 fn hash<H>(&self, state: &mut H)
1575 where
1576 H: Hasher,
1577 {
1578 self.attrs.hash(state);
1579 self.modifiers.hash(state);
1580 self.unsafety.hash(state);
1581 self.generics.hash(state);
1582 self.trait_.hash(state);
1583 self.self_ty.hash(state);
1584 self.items.hash(state);
1585 }
1586}
1587#[cfg(feature = "full")]
1588#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1589impl Hash for crate::ItemMacro {
1590 fn hash<H>(&self, state: &mut H)
1591 where
1592 H: Hasher,
1593 {
1594 self.attrs.hash(state);
1595 self.ident.hash(state);
1596 self.mac.hash(state);
1597 self.semi_token.hash(state);
1598 }
1599}
1600#[cfg(feature = "full")]
1601#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1602impl Hash for crate::ItemMod {
1603 fn hash<H>(&self, state: &mut H)
1604 where
1605 H: Hasher,
1606 {
1607 self.attrs.hash(state);
1608 self.vis.hash(state);
1609 self.unsafety.hash(state);
1610 self.ident.hash(state);
1611 self.content.hash(state);
1612 self.semi.hash(state);
1613 }
1614}
1615#[cfg(feature = "full")]
1616#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1617impl Hash for crate::ItemStatic {
1618 fn hash<H>(&self, state: &mut H)
1619 where
1620 H: Hasher,
1621 {
1622 self.attrs.hash(state);
1623 self.vis.hash(state);
1624 self.mutability.hash(state);
1625 self.ident.hash(state);
1626 self.ty.hash(state);
1627 self.expr.hash(state);
1628 }
1629}
1630#[cfg(feature = "full")]
1631#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1632impl Hash for crate::ItemStruct {
1633 fn hash<H>(&self, state: &mut H)
1634 where
1635 H: Hasher,
1636 {
1637 self.attrs.hash(state);
1638 self.vis.hash(state);
1639 self.ident.hash(state);
1640 self.generics.hash(state);
1641 self.fields.hash(state);
1642 self.semi_token.hash(state);
1643 }
1644}
1645#[cfg(feature = "full")]
1646#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1647impl Hash for crate::ItemTrait {
1648 fn hash<H>(&self, state: &mut H)
1649 where
1650 H: Hasher,
1651 {
1652 self.attrs.hash(state);
1653 self.vis.hash(state);
1654 self.modifiers.hash(state);
1655 self.unsafety.hash(state);
1656 self.ident.hash(state);
1657 self.generics.hash(state);
1658 self.colon_token.hash(state);
1659 self.supertraits.hash(state);
1660 self.items.hash(state);
1661 }
1662}
1663#[cfg(feature = "full")]
1664#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1665impl Hash for crate::ItemTraitAlias {
1666 fn hash<H>(&self, state: &mut H)
1667 where
1668 H: Hasher,
1669 {
1670 self.attrs.hash(state);
1671 self.vis.hash(state);
1672 self.ident.hash(state);
1673 self.generics.hash(state);
1674 self.bounds.hash(state);
1675 }
1676}
1677#[cfg(feature = "full")]
1678#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1679impl Hash for crate::ItemType {
1680 fn hash<H>(&self, state: &mut H)
1681 where
1682 H: Hasher,
1683 {
1684 self.attrs.hash(state);
1685 self.vis.hash(state);
1686 self.modifiers.hash(state);
1687 self.ident.hash(state);
1688 self.generics.hash(state);
1689 self.ty.hash(state);
1690 self.where_clause_placement.hash(state);
1691 }
1692}
1693#[cfg(feature = "full")]
1694#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1695impl Hash for crate::ItemUnion {
1696 fn hash<H>(&self, state: &mut H)
1697 where
1698 H: Hasher,
1699 {
1700 self.attrs.hash(state);
1701 self.vis.hash(state);
1702 self.ident.hash(state);
1703 self.generics.hash(state);
1704 self.fields.hash(state);
1705 }
1706}
1707#[cfg(feature = "full")]
1708#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1709impl Hash for crate::ItemUse {
1710 fn hash<H>(&self, state: &mut H)
1711 where
1712 H: Hasher,
1713 {
1714 self.attrs.hash(state);
1715 self.vis.hash(state);
1716 self.leading_colon.hash(state);
1717 self.tree.hash(state);
1718 }
1719}
1720#[cfg(feature = "full")]
1721#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1722impl Hash for crate::Label {
1723 fn hash<H>(&self, state: &mut H)
1724 where
1725 H: Hasher,
1726 {
1727 self.name.hash(state);
1728 }
1729}
1730#[cfg(any(feature = "derive", feature = "full"))]
1731#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1732impl Hash for crate::LifetimeParam {
1733 fn hash<H>(&self, state: &mut H)
1734 where
1735 H: Hasher,
1736 {
1737 self.attrs.hash(state);
1738 self.lifetime.hash(state);
1739 self.colon_token.hash(state);
1740 self.bounds.hash(state);
1741 }
1742}
1743#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1744impl Hash for crate::Lit {
1745 fn hash<H>(&self, state: &mut H)
1746 where
1747 H: Hasher,
1748 {
1749 match self {
1750 crate::Lit::Str(v0) => {
1751 state.write_u8(0u8);
1752 v0.hash(state);
1753 }
1754 crate::Lit::ByteStr(v0) => {
1755 state.write_u8(1u8);
1756 v0.hash(state);
1757 }
1758 crate::Lit::CStr(v0) => {
1759 state.write_u8(2u8);
1760 v0.hash(state);
1761 }
1762 crate::Lit::Byte(v0) => {
1763 state.write_u8(3u8);
1764 v0.hash(state);
1765 }
1766 crate::Lit::Char(v0) => {
1767 state.write_u8(4u8);
1768 v0.hash(state);
1769 }
1770 crate::Lit::Int(v0) => {
1771 state.write_u8(5u8);
1772 v0.hash(state);
1773 }
1774 crate::Lit::Float(v0) => {
1775 state.write_u8(6u8);
1776 v0.hash(state);
1777 }
1778 crate::Lit::Bool(v0) => {
1779 state.write_u8(7u8);
1780 v0.hash(state);
1781 }
1782 crate::Lit::Verbatim(v0) => {
1783 state.write_u8(8u8);
1784 v0.to_string().hash(state);
1785 }
1786 }
1787 }
1788}
1789#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1790impl Hash for crate::LitBool {
1791 fn hash<H>(&self, state: &mut H)
1792 where
1793 H: Hasher,
1794 {
1795 self.value.hash(state);
1796 }
1797}
1798#[cfg(feature = "full")]
1799#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1800impl Hash for crate::Local {
1801 fn hash<H>(&self, state: &mut H)
1802 where
1803 H: Hasher,
1804 {
1805 self.attrs.hash(state);
1806 self.modifiers.hash(state);
1807 self.pat.hash(state);
1808 self.init.hash(state);
1809 }
1810}
1811#[cfg(feature = "full")]
1812#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1813impl Hash for crate::LocalInit {
1814 fn hash<H>(&self, state: &mut H)
1815 where
1816 H: Hasher,
1817 {
1818 self.expr.hash(state);
1819 self.diverge.hash(state);
1820 }
1821}
1822#[cfg(feature = "full")]
1823#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1824impl Hash for crate::LocalModifiers {
1825 fn hash<H>(&self, _state: &mut H)
1826 where
1827 H: Hasher,
1828 {}
1829}
1830#[cfg(any(feature = "derive", feature = "full"))]
1831#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1832impl Hash for crate::Macro {
1833 fn hash<H>(&self, state: &mut H)
1834 where
1835 H: Hasher,
1836 {
1837 self.path.hash(state);
1838 self.delimiter.hash(state);
1839 TokenStreamHelper(&self.tokens).hash(state);
1840 }
1841}
1842#[cfg(any(feature = "derive", feature = "full"))]
1843#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1844impl Hash for crate::MacroDelimiter {
1845 fn hash<H>(&self, state: &mut H)
1846 where
1847 H: Hasher,
1848 {
1849 match self {
1850 crate::MacroDelimiter::Paren(_) => {
1851 state.write_u8(0u8);
1852 }
1853 crate::MacroDelimiter::Brace(_) => {
1854 state.write_u8(1u8);
1855 }
1856 crate::MacroDelimiter::Bracket(_) => {
1857 state.write_u8(2u8);
1858 }
1859 }
1860 }
1861}
1862#[cfg(any(feature = "derive", feature = "full"))]
1863#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1864impl Hash for crate::Meta {
1865 fn hash<H>(&self, state: &mut H)
1866 where
1867 H: Hasher,
1868 {
1869 match self {
1870 crate::Meta::Path(v0) => {
1871 state.write_u8(0u8);
1872 v0.hash(state);
1873 }
1874 crate::Meta::List(v0) => {
1875 state.write_u8(1u8);
1876 v0.hash(state);
1877 }
1878 crate::Meta::NameValue(v0) => {
1879 state.write_u8(2u8);
1880 v0.hash(state);
1881 }
1882 }
1883 }
1884}
1885#[cfg(any(feature = "derive", feature = "full"))]
1886#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1887impl Hash for crate::MetaList {
1888 fn hash<H>(&self, state: &mut H)
1889 where
1890 H: Hasher,
1891 {
1892 self.path.hash(state);
1893 self.delimiter.hash(state);
1894 TokenStreamHelper(&self.tokens).hash(state);
1895 }
1896}
1897#[cfg(any(feature = "derive", feature = "full"))]
1898#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1899impl Hash for crate::MetaNameValue {
1900 fn hash<H>(&self, state: &mut H)
1901 where
1902 H: Hasher,
1903 {
1904 self.path.hash(state);
1905 self.value.hash(state);
1906 }
1907}
1908#[cfg(any(feature = "derive", feature = "full"))]
1909#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1910impl Hash for crate::NamedArg {
1911 fn hash<H>(&self, state: &mut H)
1912 where
1913 H: Hasher,
1914 {
1915 self.attrs.hash(state);
1916 self.name.hash(state);
1917 self.ty.hash(state);
1918 }
1919}
1920#[cfg(any(feature = "derive", feature = "full"))]
1921#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1922impl Hash for crate::ParenthesizedGenericArguments {
1923 fn hash<H>(&self, state: &mut H)
1924 where
1925 H: Hasher,
1926 {
1927 self.inputs.hash(state);
1928 self.output.hash(state);
1929 }
1930}
1931#[cfg(feature = "full")]
1932#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
1933impl Hash for crate::Pat {
1934 fn hash<H>(&self, state: &mut H)
1935 where
1936 H: Hasher,
1937 {
1938 match self {
1939 crate::Pat::Const(v0) => {
1940 state.write_u8(0u8);
1941 v0.hash(state);
1942 }
1943 crate::Pat::Guard(v0) => {
1944 state.write_u8(1u8);
1945 v0.hash(state);
1946 }
1947 crate::Pat::Ident(v0) => {
1948 state.write_u8(2u8);
1949 v0.hash(state);
1950 }
1951 crate::Pat::Lit(v0) => {
1952 state.write_u8(3u8);
1953 v0.hash(state);
1954 }
1955 crate::Pat::Macro(v0) => {
1956 state.write_u8(4u8);
1957 v0.hash(state);
1958 }
1959 crate::Pat::Or(v0) => {
1960 state.write_u8(5u8);
1961 v0.hash(state);
1962 }
1963 crate::Pat::Paren(v0) => {
1964 state.write_u8(6u8);
1965 v0.hash(state);
1966 }
1967 crate::Pat::Path(v0) => {
1968 state.write_u8(7u8);
1969 v0.hash(state);
1970 }
1971 crate::Pat::Range(v0) => {
1972 state.write_u8(8u8);
1973 v0.hash(state);
1974 }
1975 crate::Pat::Reference(v0) => {
1976 state.write_u8(9u8);
1977 v0.hash(state);
1978 }
1979 crate::Pat::Rest(v0) => {
1980 state.write_u8(10u8);
1981 v0.hash(state);
1982 }
1983 crate::Pat::Slice(v0) => {
1984 state.write_u8(11u8);
1985 v0.hash(state);
1986 }
1987 crate::Pat::Struct(v0) => {
1988 state.write_u8(12u8);
1989 v0.hash(state);
1990 }
1991 crate::Pat::Tuple(v0) => {
1992 state.write_u8(13u8);
1993 v0.hash(state);
1994 }
1995 crate::Pat::TupleStruct(v0) => {
1996 state.write_u8(14u8);
1997 v0.hash(state);
1998 }
1999 crate::Pat::Type(v0) => {
2000 state.write_u8(15u8);
2001 v0.hash(state);
2002 }
2003 crate::Pat::Verbatim(v0) => {
2004 state.write_u8(16u8);
2005 TokenStreamHelper(v0).hash(state);
2006 }
2007 crate::Pat::Wild(v0) => {
2008 state.write_u8(17u8);
2009 v0.hash(state);
2010 }
2011 }
2012 }
2013}
2014#[cfg(feature = "full")]
2015#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2016impl Hash for crate::PatGuard {
2017 fn hash<H>(&self, state: &mut H)
2018 where
2019 H: Hasher,
2020 {
2021 self.attrs.hash(state);
2022 self.pat.hash(state);
2023 self.guard.hash(state);
2024 }
2025}
2026#[cfg(feature = "full")]
2027#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2028impl Hash for crate::PatIdent {
2029 fn hash<H>(&self, state: &mut H)
2030 where
2031 H: Hasher,
2032 {
2033 self.attrs.hash(state);
2034 self.by_ref.hash(state);
2035 self.mutability.hash(state);
2036 self.ident.hash(state);
2037 self.subpat.hash(state);
2038 }
2039}
2040#[cfg(feature = "full")]
2041#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2042impl Hash for crate::PatOr {
2043 fn hash<H>(&self, state: &mut H)
2044 where
2045 H: Hasher,
2046 {
2047 self.attrs.hash(state);
2048 self.leading_vert.hash(state);
2049 self.cases.hash(state);
2050 }
2051}
2052#[cfg(feature = "full")]
2053#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2054impl Hash for crate::PatParen {
2055 fn hash<H>(&self, state: &mut H)
2056 where
2057 H: Hasher,
2058 {
2059 self.attrs.hash(state);
2060 self.pat.hash(state);
2061 }
2062}
2063#[cfg(feature = "full")]
2064#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2065impl Hash for crate::PatReference {
2066 fn hash<H>(&self, state: &mut H)
2067 where
2068 H: Hasher,
2069 {
2070 self.attrs.hash(state);
2071 self.mutability.hash(state);
2072 self.pat.hash(state);
2073 }
2074}
2075#[cfg(feature = "full")]
2076#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2077impl Hash for crate::PatRest {
2078 fn hash<H>(&self, state: &mut H)
2079 where
2080 H: Hasher,
2081 {
2082 self.attrs.hash(state);
2083 }
2084}
2085#[cfg(feature = "full")]
2086#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2087impl Hash for crate::PatSlice {
2088 fn hash<H>(&self, state: &mut H)
2089 where
2090 H: Hasher,
2091 {
2092 self.attrs.hash(state);
2093 self.elems.hash(state);
2094 }
2095}
2096#[cfg(feature = "full")]
2097#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2098impl Hash for crate::PatStruct {
2099 fn hash<H>(&self, state: &mut H)
2100 where
2101 H: Hasher,
2102 {
2103 self.attrs.hash(state);
2104 self.qself.hash(state);
2105 self.path.hash(state);
2106 self.fields.hash(state);
2107 self.rest.hash(state);
2108 }
2109}
2110#[cfg(feature = "full")]
2111#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2112impl Hash for crate::PatTuple {
2113 fn hash<H>(&self, state: &mut H)
2114 where
2115 H: Hasher,
2116 {
2117 self.attrs.hash(state);
2118 self.elems.hash(state);
2119 }
2120}
2121#[cfg(feature = "full")]
2122#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2123impl Hash for crate::PatTupleStruct {
2124 fn hash<H>(&self, state: &mut H)
2125 where
2126 H: Hasher,
2127 {
2128 self.attrs.hash(state);
2129 self.qself.hash(state);
2130 self.path.hash(state);
2131 self.elems.hash(state);
2132 }
2133}
2134#[cfg(feature = "full")]
2135#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2136impl Hash for crate::PatType {
2137 fn hash<H>(&self, state: &mut H)
2138 where
2139 H: Hasher,
2140 {
2141 self.attrs.hash(state);
2142 self.pat.hash(state);
2143 self.ty.hash(state);
2144 }
2145}
2146#[cfg(feature = "full")]
2147#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2148impl Hash for crate::PatWild {
2149 fn hash<H>(&self, state: &mut H)
2150 where
2151 H: Hasher,
2152 {
2153 self.attrs.hash(state);
2154 }
2155}
2156#[cfg(any(feature = "derive", feature = "full"))]
2157#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2158impl Hash for crate::Path {
2159 fn hash<H>(&self, state: &mut H)
2160 where
2161 H: Hasher,
2162 {
2163 self.leading_colon.hash(state);
2164 self.segments.hash(state);
2165 }
2166}
2167#[cfg(any(feature = "derive", feature = "full"))]
2168#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2169impl Hash for crate::PathArguments {
2170 fn hash<H>(&self, state: &mut H)
2171 where
2172 H: Hasher,
2173 {
2174 match self {
2175 crate::PathArguments::None => {
2176 state.write_u8(0u8);
2177 }
2178 crate::PathArguments::AngleBracketed(v0) => {
2179 state.write_u8(1u8);
2180 v0.hash(state);
2181 }
2182 crate::PathArguments::Parenthesized(v0) => {
2183 state.write_u8(2u8);
2184 v0.hash(state);
2185 }
2186 }
2187 }
2188}
2189#[cfg(any(feature = "derive", feature = "full"))]
2190#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2191impl Hash for crate::PathSegment {
2192 fn hash<H>(&self, state: &mut H)
2193 where
2194 H: Hasher,
2195 {
2196 self.ident.hash(state);
2197 self.arguments.hash(state);
2198 }
2199}
2200#[cfg(any(feature = "derive", feature = "full"))]
2201#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2202impl Hash for crate::PointerMutability {
2203 fn hash<H>(&self, state: &mut H)
2204 where
2205 H: Hasher,
2206 {
2207 match self {
2208 crate::PointerMutability::Const(_) => {
2209 state.write_u8(0u8);
2210 }
2211 crate::PointerMutability::Mut(_) => {
2212 state.write_u8(1u8);
2213 }
2214 }
2215 }
2216}
2217#[cfg(feature = "full")]
2218#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2219impl Hash for crate::PreciseCapture {
2220 fn hash<H>(&self, state: &mut H)
2221 where
2222 H: Hasher,
2223 {
2224 self.params.hash(state);
2225 }
2226}
2227#[cfg(any(feature = "derive", feature = "full"))]
2228#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2229impl Hash for crate::PredicateLifetime {
2230 fn hash<H>(&self, state: &mut H)
2231 where
2232 H: Hasher,
2233 {
2234 self.attrs.hash(state);
2235 self.lifetime.hash(state);
2236 self.bounds.hash(state);
2237 }
2238}
2239#[cfg(any(feature = "derive", feature = "full"))]
2240#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2241impl Hash for crate::PredicateType {
2242 fn hash<H>(&self, state: &mut H)
2243 where
2244 H: Hasher,
2245 {
2246 self.attrs.hash(state);
2247 self.lifetimes.hash(state);
2248 self.bounded_ty.hash(state);
2249 self.bounds.hash(state);
2250 }
2251}
2252#[cfg(any(feature = "derive", feature = "full"))]
2253#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2254impl Hash for crate::QSelf {
2255 fn hash<H>(&self, state: &mut H)
2256 where
2257 H: Hasher,
2258 {
2259 self.ty.hash(state);
2260 self.position.hash(state);
2261 self.as_token.hash(state);
2262 }
2263}
2264#[cfg(feature = "full")]
2265#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2266impl Hash for crate::RangeLimits {
2267 fn hash<H>(&self, state: &mut H)
2268 where
2269 H: Hasher,
2270 {
2271 match self {
2272 crate::RangeLimits::HalfOpen(_) => {
2273 state.write_u8(0u8);
2274 }
2275 crate::RangeLimits::Closed(_) => {
2276 state.write_u8(1u8);
2277 }
2278 }
2279 }
2280}
2281#[cfg(feature = "full")]
2282#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2283impl Hash for crate::Receiver {
2284 fn hash<H>(&self, state: &mut H)
2285 where
2286 H: Hasher,
2287 {
2288 self.attrs.hash(state);
2289 self.mutability.hash(state);
2290 self.kind.hash(state);
2291 }
2292}
2293#[cfg(feature = "full")]
2294#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2295impl Hash for crate::ReceiverKind {
2296 fn hash<H>(&self, state: &mut H)
2297 where
2298 H: Hasher,
2299 {
2300 match self {
2301 crate::ReceiverKind::Value => {
2302 state.write_u8(0u8);
2303 }
2304 crate::ReceiverKind::Reference(_, v1, v2) => {
2305 state.write_u8(1u8);
2306 v1.hash(state);
2307 v2.hash(state);
2308 }
2309 crate::ReceiverKind::Typed(_, v1) => {
2310 state.write_u8(2u8);
2311 v1.hash(state);
2312 }
2313 }
2314 }
2315}
2316#[cfg(any(feature = "derive", feature = "full"))]
2317#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2318impl Hash for crate::ReturnType {
2319 fn hash<H>(&self, state: &mut H)
2320 where
2321 H: Hasher,
2322 {
2323 match self {
2324 crate::ReturnType::Default => {
2325 state.write_u8(0u8);
2326 }
2327 crate::ReturnType::Type(_, v1) => {
2328 state.write_u8(1u8);
2329 v1.hash(state);
2330 }
2331 }
2332 }
2333}
2334#[cfg(feature = "full")]
2335#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2336impl Hash for crate::Safety {
2337 fn hash<H>(&self, state: &mut H)
2338 where
2339 H: Hasher,
2340 {
2341 match self {
2342 crate::Safety::Safe(_) => {
2343 state.write_u8(0u8);
2344 }
2345 crate::Safety::Unsafe(_) => {
2346 state.write_u8(1u8);
2347 }
2348 crate::Safety::Default => {
2349 state.write_u8(2u8);
2350 }
2351 }
2352 }
2353}
2354#[cfg(feature = "full")]
2355#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2356impl Hash for crate::Signature {
2357 fn hash<H>(&self, state: &mut H)
2358 where
2359 H: Hasher,
2360 {
2361 self.constness.hash(state);
2362 self.asyncness.hash(state);
2363 self.safety.hash(state);
2364 self.abi.hash(state);
2365 self.ident.hash(state);
2366 self.generics.hash(state);
2367 self.inputs.hash(state);
2368 self.variadic.hash(state);
2369 self.output.hash(state);
2370 }
2371}
2372#[cfg(feature = "full")]
2373#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2374impl Hash for crate::StaticMutability {
2375 fn hash<H>(&self, state: &mut H)
2376 where
2377 H: Hasher,
2378 {
2379 match self {
2380 crate::StaticMutability::Mut(_) => {
2381 state.write_u8(0u8);
2382 }
2383 crate::StaticMutability::None => {
2384 state.write_u8(1u8);
2385 }
2386 }
2387 }
2388}
2389#[cfg(feature = "full")]
2390#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2391impl Hash for crate::Stmt {
2392 fn hash<H>(&self, state: &mut H)
2393 where
2394 H: Hasher,
2395 {
2396 match self {
2397 crate::Stmt::Local(v0) => {
2398 state.write_u8(0u8);
2399 v0.hash(state);
2400 }
2401 crate::Stmt::Item(v0) => {
2402 state.write_u8(1u8);
2403 v0.hash(state);
2404 }
2405 crate::Stmt::Expr(v0, v1) => {
2406 state.write_u8(2u8);
2407 v0.hash(state);
2408 v1.hash(state);
2409 }
2410 crate::Stmt::Macro(v0) => {
2411 state.write_u8(3u8);
2412 v0.hash(state);
2413 }
2414 }
2415 }
2416}
2417#[cfg(feature = "full")]
2418#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2419impl Hash for crate::StmtMacro {
2420 fn hash<H>(&self, state: &mut H)
2421 where
2422 H: Hasher,
2423 {
2424 self.attrs.hash(state);
2425 self.mac.hash(state);
2426 self.semi_token.hash(state);
2427 }
2428}
2429#[cfg(any(feature = "derive", feature = "full"))]
2430#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2431impl Hash for crate::TraitBound {
2432 fn hash<H>(&self, state: &mut H)
2433 where
2434 H: Hasher,
2435 {
2436 self.paren_token.hash(state);
2437 self.lifetimes.hash(state);
2438 self.modifiers.hash(state);
2439 self.maybe.hash(state);
2440 self.path.hash(state);
2441 }
2442}
2443#[cfg(any(feature = "derive", feature = "full"))]
2444#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2445impl Hash for crate::TraitBoundModifiers {
2446 fn hash<H>(&self, _state: &mut H)
2447 where
2448 H: Hasher,
2449 {}
2450}
2451#[cfg(feature = "full")]
2452#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2453impl Hash for crate::TraitItem {
2454 fn hash<H>(&self, state: &mut H)
2455 where
2456 H: Hasher,
2457 {
2458 match self {
2459 crate::TraitItem::Const(v0) => {
2460 state.write_u8(0u8);
2461 v0.hash(state);
2462 }
2463 crate::TraitItem::Fn(v0) => {
2464 state.write_u8(1u8);
2465 v0.hash(state);
2466 }
2467 crate::TraitItem::Type(v0) => {
2468 state.write_u8(2u8);
2469 v0.hash(state);
2470 }
2471 crate::TraitItem::Macro(v0) => {
2472 state.write_u8(3u8);
2473 v0.hash(state);
2474 }
2475 crate::TraitItem::Verbatim(v0) => {
2476 state.write_u8(4u8);
2477 TokenStreamHelper(v0).hash(state);
2478 }
2479 }
2480 }
2481}
2482#[cfg(feature = "full")]
2483#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2484impl Hash for crate::TraitItemConst {
2485 fn hash<H>(&self, state: &mut H)
2486 where
2487 H: Hasher,
2488 {
2489 self.attrs.hash(state);
2490 self.modifiers.hash(state);
2491 self.ident.hash(state);
2492 self.generics.hash(state);
2493 self.ty.hash(state);
2494 self.default.hash(state);
2495 }
2496}
2497#[cfg(feature = "full")]
2498#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2499impl Hash for crate::TraitItemFn {
2500 fn hash<H>(&self, state: &mut H)
2501 where
2502 H: Hasher,
2503 {
2504 self.attrs.hash(state);
2505 self.modifiers.hash(state);
2506 self.sig.hash(state);
2507 self.default.hash(state);
2508 self.semi_token.hash(state);
2509 }
2510}
2511#[cfg(feature = "full")]
2512#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2513impl Hash for crate::TraitItemMacro {
2514 fn hash<H>(&self, state: &mut H)
2515 where
2516 H: Hasher,
2517 {
2518 self.attrs.hash(state);
2519 self.mac.hash(state);
2520 self.semi_token.hash(state);
2521 }
2522}
2523#[cfg(feature = "full")]
2524#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2525impl Hash for crate::TraitItemType {
2526 fn hash<H>(&self, state: &mut H)
2527 where
2528 H: Hasher,
2529 {
2530 self.attrs.hash(state);
2531 self.modifiers.hash(state);
2532 self.ident.hash(state);
2533 self.generics.hash(state);
2534 self.colon_token.hash(state);
2535 self.bounds.hash(state);
2536 self.default.hash(state);
2537 }
2538}
2539#[cfg(feature = "full")]
2540#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2541impl Hash for crate::TraitModifiers {
2542 fn hash<H>(&self, state: &mut H)
2543 where
2544 H: Hasher,
2545 {
2546 self.auto_token.hash(state);
2547 }
2548}
2549#[cfg(any(feature = "derive", feature = "full"))]
2550#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2551impl Hash for crate::Type {
2552 fn hash<H>(&self, state: &mut H)
2553 where
2554 H: Hasher,
2555 {
2556 match self {
2557 crate::Type::Array(v0) => {
2558 state.write_u8(0u8);
2559 v0.hash(state);
2560 }
2561 crate::Type::FnPtr(v0) => {
2562 state.write_u8(1u8);
2563 v0.hash(state);
2564 }
2565 crate::Type::Group(v0) => {
2566 state.write_u8(2u8);
2567 v0.hash(state);
2568 }
2569 crate::Type::ImplTrait(v0) => {
2570 state.write_u8(3u8);
2571 v0.hash(state);
2572 }
2573 crate::Type::Infer(v0) => {
2574 state.write_u8(4u8);
2575 v0.hash(state);
2576 }
2577 crate::Type::Macro(v0) => {
2578 state.write_u8(5u8);
2579 v0.hash(state);
2580 }
2581 crate::Type::Never(v0) => {
2582 state.write_u8(6u8);
2583 v0.hash(state);
2584 }
2585 crate::Type::Paren(v0) => {
2586 state.write_u8(7u8);
2587 v0.hash(state);
2588 }
2589 crate::Type::Path(v0) => {
2590 state.write_u8(8u8);
2591 v0.hash(state);
2592 }
2593 crate::Type::Ptr(v0) => {
2594 state.write_u8(9u8);
2595 v0.hash(state);
2596 }
2597 crate::Type::Reference(v0) => {
2598 state.write_u8(10u8);
2599 v0.hash(state);
2600 }
2601 crate::Type::Slice(v0) => {
2602 state.write_u8(11u8);
2603 v0.hash(state);
2604 }
2605 crate::Type::TraitObject(v0) => {
2606 state.write_u8(12u8);
2607 v0.hash(state);
2608 }
2609 crate::Type::Tuple(v0) => {
2610 state.write_u8(13u8);
2611 v0.hash(state);
2612 }
2613 crate::Type::Verbatim(v0) => {
2614 state.write_u8(14u8);
2615 TokenStreamHelper(v0).hash(state);
2616 }
2617 }
2618 }
2619}
2620#[cfg(any(feature = "derive", feature = "full"))]
2621#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2622impl Hash for crate::TypeArray {
2623 fn hash<H>(&self, state: &mut H)
2624 where
2625 H: Hasher,
2626 {
2627 self.attrs.hash(state);
2628 self.elem.hash(state);
2629 self.len.hash(state);
2630 }
2631}
2632#[cfg(any(feature = "derive", feature = "full"))]
2633#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2634impl Hash for crate::TypeFnPtr {
2635 fn hash<H>(&self, state: &mut H)
2636 where
2637 H: Hasher,
2638 {
2639 self.attrs.hash(state);
2640 self.lifetimes.hash(state);
2641 self.unsafety.hash(state);
2642 self.abi.hash(state);
2643 self.inputs.hash(state);
2644 self.variadic.hash(state);
2645 self.output.hash(state);
2646 }
2647}
2648#[cfg(any(feature = "derive", feature = "full"))]
2649#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2650impl Hash for crate::TypeGroup {
2651 fn hash<H>(&self, state: &mut H)
2652 where
2653 H: Hasher,
2654 {
2655 self.attrs.hash(state);
2656 self.elem.hash(state);
2657 }
2658}
2659#[cfg(any(feature = "derive", feature = "full"))]
2660#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2661impl Hash for crate::TypeImplTrait {
2662 fn hash<H>(&self, state: &mut H)
2663 where
2664 H: Hasher,
2665 {
2666 self.attrs.hash(state);
2667 self.bounds.hash(state);
2668 }
2669}
2670#[cfg(any(feature = "derive", feature = "full"))]
2671#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2672impl Hash for crate::TypeInfer {
2673 fn hash<H>(&self, state: &mut H)
2674 where
2675 H: Hasher,
2676 {
2677 self.attrs.hash(state);
2678 }
2679}
2680#[cfg(any(feature = "derive", feature = "full"))]
2681#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2682impl Hash for crate::TypeMacro {
2683 fn hash<H>(&self, state: &mut H)
2684 where
2685 H: Hasher,
2686 {
2687 self.attrs.hash(state);
2688 self.mac.hash(state);
2689 }
2690}
2691#[cfg(feature = "full")]
2692#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2693impl Hash for crate::TypeModifiers {
2694 fn hash<H>(&self, state: &mut H)
2695 where
2696 H: Hasher,
2697 {
2698 self.defaultness.hash(state);
2699 }
2700}
2701#[cfg(any(feature = "derive", feature = "full"))]
2702#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2703impl Hash for crate::TypeNever {
2704 fn hash<H>(&self, state: &mut H)
2705 where
2706 H: Hasher,
2707 {
2708 self.attrs.hash(state);
2709 }
2710}
2711#[cfg(any(feature = "derive", feature = "full"))]
2712#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2713impl Hash for crate::TypeParam {
2714 fn hash<H>(&self, state: &mut H)
2715 where
2716 H: Hasher,
2717 {
2718 self.attrs.hash(state);
2719 self.ident.hash(state);
2720 self.colon_token.hash(state);
2721 self.bounds.hash(state);
2722 self.default.hash(state);
2723 }
2724}
2725#[cfg(any(feature = "derive", feature = "full"))]
2726#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2727impl Hash for crate::TypeParamBound {
2728 fn hash<H>(&self, state: &mut H)
2729 where
2730 H: Hasher,
2731 {
2732 match self {
2733 crate::TypeParamBound::Trait(v0) => {
2734 state.write_u8(0u8);
2735 v0.hash(state);
2736 }
2737 crate::TypeParamBound::Lifetime(v0) => {
2738 state.write_u8(1u8);
2739 v0.hash(state);
2740 }
2741 #[cfg(feature = "full")]
2742 crate::TypeParamBound::PreciseCapture(v0) => {
2743 state.write_u8(2u8);
2744 v0.hash(state);
2745 }
2746 crate::TypeParamBound::Verbatim(v0) => {
2747 state.write_u8(3u8);
2748 TokenStreamHelper(v0).hash(state);
2749 }
2750 #[cfg(not(feature = "full"))]
2751 _ => unreachable!(),
2752 }
2753 }
2754}
2755#[cfg(any(feature = "derive", feature = "full"))]
2756#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2757impl Hash for crate::TypeParen {
2758 fn hash<H>(&self, state: &mut H)
2759 where
2760 H: Hasher,
2761 {
2762 self.attrs.hash(state);
2763 self.elem.hash(state);
2764 }
2765}
2766#[cfg(any(feature = "derive", feature = "full"))]
2767#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2768impl Hash for crate::TypePath {
2769 fn hash<H>(&self, state: &mut H)
2770 where
2771 H: Hasher,
2772 {
2773 self.attrs.hash(state);
2774 self.qself.hash(state);
2775 self.path.hash(state);
2776 }
2777}
2778#[cfg(any(feature = "derive", feature = "full"))]
2779#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2780impl Hash for crate::TypePtr {
2781 fn hash<H>(&self, state: &mut H)
2782 where
2783 H: Hasher,
2784 {
2785 self.attrs.hash(state);
2786 self.mutability.hash(state);
2787 self.elem.hash(state);
2788 }
2789}
2790#[cfg(any(feature = "derive", feature = "full"))]
2791#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2792impl Hash for crate::TypeReference {
2793 fn hash<H>(&self, state: &mut H)
2794 where
2795 H: Hasher,
2796 {
2797 self.attrs.hash(state);
2798 self.lifetime.hash(state);
2799 self.mutability.hash(state);
2800 self.elem.hash(state);
2801 }
2802}
2803#[cfg(any(feature = "derive", feature = "full"))]
2804#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2805impl Hash for crate::TypeSlice {
2806 fn hash<H>(&self, state: &mut H)
2807 where
2808 H: Hasher,
2809 {
2810 self.attrs.hash(state);
2811 self.elem.hash(state);
2812 }
2813}
2814#[cfg(any(feature = "derive", feature = "full"))]
2815#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2816impl Hash for crate::TypeTraitObject {
2817 fn hash<H>(&self, state: &mut H)
2818 where
2819 H: Hasher,
2820 {
2821 self.attrs.hash(state);
2822 self.dyn_token.hash(state);
2823 self.bounds.hash(state);
2824 }
2825}
2826#[cfg(any(feature = "derive", feature = "full"))]
2827#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2828impl Hash for crate::TypeTuple {
2829 fn hash<H>(&self, state: &mut H)
2830 where
2831 H: Hasher,
2832 {
2833 self.attrs.hash(state);
2834 self.elems.hash(state);
2835 }
2836}
2837#[cfg(any(feature = "derive", feature = "full"))]
2838#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2839impl Hash for crate::UnOp {
2840 fn hash<H>(&self, state: &mut H)
2841 where
2842 H: Hasher,
2843 {
2844 match self {
2845 crate::UnOp::Deref(_) => {
2846 state.write_u8(0u8);
2847 }
2848 crate::UnOp::Not(_) => {
2849 state.write_u8(1u8);
2850 }
2851 crate::UnOp::Neg(_) => {
2852 state.write_u8(2u8);
2853 }
2854 }
2855 }
2856}
2857#[cfg(feature = "full")]
2858#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2859impl Hash for crate::UseGlob {
2860 fn hash<H>(&self, _state: &mut H)
2861 where
2862 H: Hasher,
2863 {}
2864}
2865#[cfg(feature = "full")]
2866#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2867impl Hash for crate::UseGroup {
2868 fn hash<H>(&self, state: &mut H)
2869 where
2870 H: Hasher,
2871 {
2872 self.items.hash(state);
2873 }
2874}
2875#[cfg(feature = "full")]
2876#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2877impl Hash for crate::UseName {
2878 fn hash<H>(&self, state: &mut H)
2879 where
2880 H: Hasher,
2881 {
2882 self.ident.hash(state);
2883 }
2884}
2885#[cfg(feature = "full")]
2886#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2887impl Hash for crate::UsePath {
2888 fn hash<H>(&self, state: &mut H)
2889 where
2890 H: Hasher,
2891 {
2892 self.ident.hash(state);
2893 self.tree.hash(state);
2894 }
2895}
2896#[cfg(feature = "full")]
2897#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2898impl Hash for crate::UseRename {
2899 fn hash<H>(&self, state: &mut H)
2900 where
2901 H: Hasher,
2902 {
2903 self.ident.hash(state);
2904 self.rename.hash(state);
2905 }
2906}
2907#[cfg(feature = "full")]
2908#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2909impl Hash for crate::UseTree {
2910 fn hash<H>(&self, state: &mut H)
2911 where
2912 H: Hasher,
2913 {
2914 match self {
2915 crate::UseTree::Path(v0) => {
2916 state.write_u8(0u8);
2917 v0.hash(state);
2918 }
2919 crate::UseTree::Name(v0) => {
2920 state.write_u8(1u8);
2921 v0.hash(state);
2922 }
2923 crate::UseTree::Rename(v0) => {
2924 state.write_u8(2u8);
2925 v0.hash(state);
2926 }
2927 crate::UseTree::Glob(v0) => {
2928 state.write_u8(3u8);
2929 v0.hash(state);
2930 }
2931 crate::UseTree::Group(v0) => {
2932 state.write_u8(4u8);
2933 v0.hash(state);
2934 }
2935 }
2936 }
2937}
2938#[cfg(feature = "full")]
2939#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2940impl Hash for crate::Variadic {
2941 fn hash<H>(&self, state: &mut H)
2942 where
2943 H: Hasher,
2944 {
2945 self.attrs.hash(state);
2946 self.pat.hash(state);
2947 self.comma.hash(state);
2948 }
2949}
2950#[cfg(any(feature = "derive", feature = "full"))]
2951#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2952impl Hash for crate::Variant {
2953 fn hash<H>(&self, state: &mut H)
2954 where
2955 H: Hasher,
2956 {
2957 self.attrs.hash(state);
2958 self.ident.hash(state);
2959 self.fields.hash(state);
2960 self.discriminant.hash(state);
2961 }
2962}
2963#[cfg(any(feature = "derive", feature = "full"))]
2964#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2965impl Hash for crate::VisRestricted {
2966 fn hash<H>(&self, state: &mut H)
2967 where
2968 H: Hasher,
2969 {
2970 self.in_token.hash(state);
2971 self.path.hash(state);
2972 }
2973}
2974#[cfg(any(feature = "derive", feature = "full"))]
2975#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2976impl Hash for crate::Visibility {
2977 fn hash<H>(&self, state: &mut H)
2978 where
2979 H: Hasher,
2980 {
2981 match self {
2982 crate::Visibility::Public(_) => {
2983 state.write_u8(0u8);
2984 }
2985 crate::Visibility::Restricted(v0) => {
2986 state.write_u8(1u8);
2987 v0.hash(state);
2988 }
2989 crate::Visibility::Inherited => {
2990 state.write_u8(2u8);
2991 }
2992 }
2993 }
2994}
2995#[cfg(any(feature = "derive", feature = "full"))]
2996#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
2997impl Hash for crate::WhereClause {
2998 fn hash<H>(&self, state: &mut H)
2999 where
3000 H: Hasher,
3001 {
3002 self.predicates.hash(state);
3003 }
3004}
3005#[cfg(feature = "full")]
3006#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
3007impl Hash for crate::WhereClausePlacement {
3008 fn hash<H>(&self, state: &mut H)
3009 where
3010 H: Hasher,
3011 {
3012 match self {
3013 crate::WhereClausePlacement::Early => {
3014 state.write_u8(0u8);
3015 }
3016 crate::WhereClausePlacement::Late => {
3017 state.write_u8(1u8);
3018 }
3019 }
3020 }
3021}
3022#[cfg(any(feature = "derive", feature = "full"))]
3023#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]
3024impl Hash for crate::WherePredicate {
3025 fn hash<H>(&self, state: &mut H)
3026 where
3027 H: Hasher,
3028 {
3029 match self {
3030 crate::WherePredicate::Lifetime(v0) => {
3031 state.write_u8(0u8);
3032 v0.hash(state);
3033 }
3034 crate::WherePredicate::Type(v0) => {
3035 state.write_u8(1u8);
3036 v0.hash(state);
3037 }
3038 }
3039 }
3040}