diff options
Diffstat (limited to 'crates/ra_syntax/src/ast/generated')
-rw-r--r-- | crates/ra_syntax/src/ast/generated/nodes.rs | 1380 |
1 files changed, 690 insertions, 690 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 846212a6f..8b348ad6e 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs | |||
@@ -10,11 +10,6 @@ use crate::{ | |||
10 | pub struct SourceFile { | 10 | pub struct SourceFile { |
11 | pub(crate) syntax: SyntaxNode, | 11 | pub(crate) syntax: SyntaxNode, |
12 | } | 12 | } |
13 | impl std::fmt::Display for SourceFile { | ||
14 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
15 | std::fmt::Display::fmt(self.syntax(), f) | ||
16 | } | ||
17 | } | ||
18 | impl AstNode for SourceFile { | 13 | impl AstNode for SourceFile { |
19 | fn can_cast(kind: SyntaxKind) -> bool { kind == SOURCE_FILE } | 14 | fn can_cast(kind: SyntaxKind) -> bool { kind == SOURCE_FILE } |
20 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 15 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -36,11 +31,6 @@ impl SourceFile { | |||
36 | pub struct FnDef { | 31 | pub struct FnDef { |
37 | pub(crate) syntax: SyntaxNode, | 32 | pub(crate) syntax: SyntaxNode, |
38 | } | 33 | } |
39 | impl std::fmt::Display for FnDef { | ||
40 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
41 | std::fmt::Display::fmt(self.syntax(), f) | ||
42 | } | ||
43 | } | ||
44 | impl AstNode for FnDef { | 34 | impl AstNode for FnDef { |
45 | fn can_cast(kind: SyntaxKind) -> bool { kind == FN_DEF } | 35 | fn can_cast(kind: SyntaxKind) -> bool { kind == FN_DEF } |
46 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 36 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -73,11 +63,6 @@ impl FnDef { | |||
73 | pub struct RetType { | 63 | pub struct RetType { |
74 | pub(crate) syntax: SyntaxNode, | 64 | pub(crate) syntax: SyntaxNode, |
75 | } | 65 | } |
76 | impl std::fmt::Display for RetType { | ||
77 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
78 | std::fmt::Display::fmt(self.syntax(), f) | ||
79 | } | ||
80 | } | ||
81 | impl AstNode for RetType { | 66 | impl AstNode for RetType { |
82 | fn can_cast(kind: SyntaxKind) -> bool { kind == RET_TYPE } | 67 | fn can_cast(kind: SyntaxKind) -> bool { kind == RET_TYPE } |
83 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 68 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -97,11 +82,6 @@ impl RetType { | |||
97 | pub struct StructDef { | 82 | pub struct StructDef { |
98 | pub(crate) syntax: SyntaxNode, | 83 | pub(crate) syntax: SyntaxNode, |
99 | } | 84 | } |
100 | impl std::fmt::Display for StructDef { | ||
101 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
102 | std::fmt::Display::fmt(self.syntax(), f) | ||
103 | } | ||
104 | } | ||
105 | impl AstNode for StructDef { | 85 | impl AstNode for StructDef { |
106 | fn can_cast(kind: SyntaxKind) -> bool { kind == STRUCT_DEF } | 86 | fn can_cast(kind: SyntaxKind) -> bool { kind == STRUCT_DEF } |
107 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 87 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -127,11 +107,6 @@ impl StructDef { | |||
127 | pub struct UnionDef { | 107 | pub struct UnionDef { |
128 | pub(crate) syntax: SyntaxNode, | 108 | pub(crate) syntax: SyntaxNode, |
129 | } | 109 | } |
130 | impl std::fmt::Display for UnionDef { | ||
131 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
132 | std::fmt::Display::fmt(self.syntax(), f) | ||
133 | } | ||
134 | } | ||
135 | impl AstNode for UnionDef { | 110 | impl AstNode for UnionDef { |
136 | fn can_cast(kind: SyntaxKind) -> bool { kind == UNION_DEF } | 111 | fn can_cast(kind: SyntaxKind) -> bool { kind == UNION_DEF } |
137 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 112 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -158,11 +133,6 @@ impl UnionDef { | |||
158 | pub struct RecordFieldDefList { | 133 | pub struct RecordFieldDefList { |
159 | pub(crate) syntax: SyntaxNode, | 134 | pub(crate) syntax: SyntaxNode, |
160 | } | 135 | } |
161 | impl std::fmt::Display for RecordFieldDefList { | ||
162 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
163 | std::fmt::Display::fmt(self.syntax(), f) | ||
164 | } | ||
165 | } | ||
166 | impl AstNode for RecordFieldDefList { | 136 | impl AstNode for RecordFieldDefList { |
167 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_DEF_LIST } | 137 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_DEF_LIST } |
168 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 138 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -183,11 +153,6 @@ impl RecordFieldDefList { | |||
183 | pub struct RecordFieldDef { | 153 | pub struct RecordFieldDef { |
184 | pub(crate) syntax: SyntaxNode, | 154 | pub(crate) syntax: SyntaxNode, |
185 | } | 155 | } |
186 | impl std::fmt::Display for RecordFieldDef { | ||
187 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
188 | std::fmt::Display::fmt(self.syntax(), f) | ||
189 | } | ||
190 | } | ||
191 | impl AstNode for RecordFieldDef { | 156 | impl AstNode for RecordFieldDef { |
192 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_DEF } | 157 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_DEF } |
193 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 158 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -209,11 +174,6 @@ impl RecordFieldDef {} | |||
209 | pub struct TupleFieldDefList { | 174 | pub struct TupleFieldDefList { |
210 | pub(crate) syntax: SyntaxNode, | 175 | pub(crate) syntax: SyntaxNode, |
211 | } | 176 | } |
212 | impl std::fmt::Display for TupleFieldDefList { | ||
213 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
214 | std::fmt::Display::fmt(self.syntax(), f) | ||
215 | } | ||
216 | } | ||
217 | impl AstNode for TupleFieldDefList { | 177 | impl AstNode for TupleFieldDefList { |
218 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_FIELD_DEF_LIST } | 178 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_FIELD_DEF_LIST } |
219 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 179 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -234,11 +194,6 @@ impl TupleFieldDefList { | |||
234 | pub struct TupleFieldDef { | 194 | pub struct TupleFieldDef { |
235 | pub(crate) syntax: SyntaxNode, | 195 | pub(crate) syntax: SyntaxNode, |
236 | } | 196 | } |
237 | impl std::fmt::Display for TupleFieldDef { | ||
238 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
239 | std::fmt::Display::fmt(self.syntax(), f) | ||
240 | } | ||
241 | } | ||
242 | impl AstNode for TupleFieldDef { | 197 | impl AstNode for TupleFieldDef { |
243 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_FIELD_DEF } | 198 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_FIELD_DEF } |
244 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 199 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -259,11 +214,6 @@ impl TupleFieldDef { | |||
259 | pub struct EnumDef { | 214 | pub struct EnumDef { |
260 | pub(crate) syntax: SyntaxNode, | 215 | pub(crate) syntax: SyntaxNode, |
261 | } | 216 | } |
262 | impl std::fmt::Display for EnumDef { | ||
263 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
264 | std::fmt::Display::fmt(self.syntax(), f) | ||
265 | } | ||
266 | } | ||
267 | impl AstNode for EnumDef { | 217 | impl AstNode for EnumDef { |
268 | fn can_cast(kind: SyntaxKind) -> bool { kind == ENUM_DEF } | 218 | fn can_cast(kind: SyntaxKind) -> bool { kind == ENUM_DEF } |
269 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 219 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -288,11 +238,6 @@ impl EnumDef { | |||
288 | pub struct EnumVariantList { | 238 | pub struct EnumVariantList { |
289 | pub(crate) syntax: SyntaxNode, | 239 | pub(crate) syntax: SyntaxNode, |
290 | } | 240 | } |
291 | impl std::fmt::Display for EnumVariantList { | ||
292 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
293 | std::fmt::Display::fmt(self.syntax(), f) | ||
294 | } | ||
295 | } | ||
296 | impl AstNode for EnumVariantList { | 241 | impl AstNode for EnumVariantList { |
297 | fn can_cast(kind: SyntaxKind) -> bool { kind == ENUM_VARIANT_LIST } | 242 | fn can_cast(kind: SyntaxKind) -> bool { kind == ENUM_VARIANT_LIST } |
298 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 243 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -313,11 +258,6 @@ impl EnumVariantList { | |||
313 | pub struct EnumVariant { | 258 | pub struct EnumVariant { |
314 | pub(crate) syntax: SyntaxNode, | 259 | pub(crate) syntax: SyntaxNode, |
315 | } | 260 | } |
316 | impl std::fmt::Display for EnumVariant { | ||
317 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
318 | std::fmt::Display::fmt(self.syntax(), f) | ||
319 | } | ||
320 | } | ||
321 | impl AstNode for EnumVariant { | 261 | impl AstNode for EnumVariant { |
322 | fn can_cast(kind: SyntaxKind) -> bool { kind == ENUM_VARIANT } | 262 | fn can_cast(kind: SyntaxKind) -> bool { kind == ENUM_VARIANT } |
323 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 263 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -342,11 +282,6 @@ impl EnumVariant { | |||
342 | pub struct TraitDef { | 282 | pub struct TraitDef { |
343 | pub(crate) syntax: SyntaxNode, | 283 | pub(crate) syntax: SyntaxNode, |
344 | } | 284 | } |
345 | impl std::fmt::Display for TraitDef { | ||
346 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
347 | std::fmt::Display::fmt(self.syntax(), f) | ||
348 | } | ||
349 | } | ||
350 | impl AstNode for TraitDef { | 285 | impl AstNode for TraitDef { |
351 | fn can_cast(kind: SyntaxKind) -> bool { kind == TRAIT_DEF } | 286 | fn can_cast(kind: SyntaxKind) -> bool { kind == TRAIT_DEF } |
352 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 287 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -374,11 +309,6 @@ impl TraitDef { | |||
374 | pub struct Module { | 309 | pub struct Module { |
375 | pub(crate) syntax: SyntaxNode, | 310 | pub(crate) syntax: SyntaxNode, |
376 | } | 311 | } |
377 | impl std::fmt::Display for Module { | ||
378 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
379 | std::fmt::Display::fmt(self.syntax(), f) | ||
380 | } | ||
381 | } | ||
382 | impl AstNode for Module { | 312 | impl AstNode for Module { |
383 | fn can_cast(kind: SyntaxKind) -> bool { kind == MODULE } | 313 | fn can_cast(kind: SyntaxKind) -> bool { kind == MODULE } |
384 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 314 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -403,11 +333,6 @@ impl Module { | |||
403 | pub struct ItemList { | 333 | pub struct ItemList { |
404 | pub(crate) syntax: SyntaxNode, | 334 | pub(crate) syntax: SyntaxNode, |
405 | } | 335 | } |
406 | impl std::fmt::Display for ItemList { | ||
407 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
408 | std::fmt::Display::fmt(self.syntax(), f) | ||
409 | } | ||
410 | } | ||
411 | impl AstNode for ItemList { | 336 | impl AstNode for ItemList { |
412 | fn can_cast(kind: SyntaxKind) -> bool { kind == ITEM_LIST } | 337 | fn can_cast(kind: SyntaxKind) -> bool { kind == ITEM_LIST } |
413 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 338 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -430,11 +355,6 @@ impl ItemList { | |||
430 | pub struct ConstDef { | 355 | pub struct ConstDef { |
431 | pub(crate) syntax: SyntaxNode, | 356 | pub(crate) syntax: SyntaxNode, |
432 | } | 357 | } |
433 | impl std::fmt::Display for ConstDef { | ||
434 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
435 | std::fmt::Display::fmt(self.syntax(), f) | ||
436 | } | ||
437 | } | ||
438 | impl AstNode for ConstDef { | 358 | impl AstNode for ConstDef { |
439 | fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_DEF } | 359 | fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_DEF } |
440 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 360 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -463,11 +383,6 @@ impl ConstDef { | |||
463 | pub struct StaticDef { | 383 | pub struct StaticDef { |
464 | pub(crate) syntax: SyntaxNode, | 384 | pub(crate) syntax: SyntaxNode, |
465 | } | 385 | } |
466 | impl std::fmt::Display for StaticDef { | ||
467 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
468 | std::fmt::Display::fmt(self.syntax(), f) | ||
469 | } | ||
470 | } | ||
471 | impl AstNode for StaticDef { | 386 | impl AstNode for StaticDef { |
472 | fn can_cast(kind: SyntaxKind) -> bool { kind == STATIC_DEF } | 387 | fn can_cast(kind: SyntaxKind) -> bool { kind == STATIC_DEF } |
473 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 388 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -496,11 +411,6 @@ impl StaticDef { | |||
496 | pub struct TypeAliasDef { | 411 | pub struct TypeAliasDef { |
497 | pub(crate) syntax: SyntaxNode, | 412 | pub(crate) syntax: SyntaxNode, |
498 | } | 413 | } |
499 | impl std::fmt::Display for TypeAliasDef { | ||
500 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
501 | std::fmt::Display::fmt(self.syntax(), f) | ||
502 | } | ||
503 | } | ||
504 | impl AstNode for TypeAliasDef { | 414 | impl AstNode for TypeAliasDef { |
505 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ALIAS_DEF } | 415 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ALIAS_DEF } |
506 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 416 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -529,11 +439,6 @@ impl TypeAliasDef { | |||
529 | pub struct ImplDef { | 439 | pub struct ImplDef { |
530 | pub(crate) syntax: SyntaxNode, | 440 | pub(crate) syntax: SyntaxNode, |
531 | } | 441 | } |
532 | impl std::fmt::Display for ImplDef { | ||
533 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
534 | std::fmt::Display::fmt(self.syntax(), f) | ||
535 | } | ||
536 | } | ||
537 | impl AstNode for ImplDef { | 442 | impl AstNode for ImplDef { |
538 | fn can_cast(kind: SyntaxKind) -> bool { kind == IMPL_DEF } | 443 | fn can_cast(kind: SyntaxKind) -> bool { kind == IMPL_DEF } |
539 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 444 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -560,11 +465,6 @@ impl ImplDef { | |||
560 | pub struct ParenType { | 465 | pub struct ParenType { |
561 | pub(crate) syntax: SyntaxNode, | 466 | pub(crate) syntax: SyntaxNode, |
562 | } | 467 | } |
563 | impl std::fmt::Display for ParenType { | ||
564 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
565 | std::fmt::Display::fmt(self.syntax(), f) | ||
566 | } | ||
567 | } | ||
568 | impl AstNode for ParenType { | 468 | impl AstNode for ParenType { |
569 | fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_TYPE } | 469 | fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_TYPE } |
570 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 470 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -585,11 +485,6 @@ impl ParenType { | |||
585 | pub struct TupleType { | 485 | pub struct TupleType { |
586 | pub(crate) syntax: SyntaxNode, | 486 | pub(crate) syntax: SyntaxNode, |
587 | } | 487 | } |
588 | impl std::fmt::Display for TupleType { | ||
589 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
590 | std::fmt::Display::fmt(self.syntax(), f) | ||
591 | } | ||
592 | } | ||
593 | impl AstNode for TupleType { | 488 | impl AstNode for TupleType { |
594 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_TYPE } | 489 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_TYPE } |
595 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 490 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -610,11 +505,6 @@ impl TupleType { | |||
610 | pub struct NeverType { | 505 | pub struct NeverType { |
611 | pub(crate) syntax: SyntaxNode, | 506 | pub(crate) syntax: SyntaxNode, |
612 | } | 507 | } |
613 | impl std::fmt::Display for NeverType { | ||
614 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
615 | std::fmt::Display::fmt(self.syntax(), f) | ||
616 | } | ||
617 | } | ||
618 | impl AstNode for NeverType { | 508 | impl AstNode for NeverType { |
619 | fn can_cast(kind: SyntaxKind) -> bool { kind == NEVER_TYPE } | 509 | fn can_cast(kind: SyntaxKind) -> bool { kind == NEVER_TYPE } |
620 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 510 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -633,11 +523,6 @@ impl NeverType { | |||
633 | pub struct PathType { | 523 | pub struct PathType { |
634 | pub(crate) syntax: SyntaxNode, | 524 | pub(crate) syntax: SyntaxNode, |
635 | } | 525 | } |
636 | impl std::fmt::Display for PathType { | ||
637 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
638 | std::fmt::Display::fmt(self.syntax(), f) | ||
639 | } | ||
640 | } | ||
641 | impl AstNode for PathType { | 526 | impl AstNode for PathType { |
642 | fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_TYPE } | 527 | fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_TYPE } |
643 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 528 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -656,11 +541,6 @@ impl PathType { | |||
656 | pub struct PointerType { | 541 | pub struct PointerType { |
657 | pub(crate) syntax: SyntaxNode, | 542 | pub(crate) syntax: SyntaxNode, |
658 | } | 543 | } |
659 | impl std::fmt::Display for PointerType { | ||
660 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
661 | std::fmt::Display::fmt(self.syntax(), f) | ||
662 | } | ||
663 | } | ||
664 | impl AstNode for PointerType { | 544 | impl AstNode for PointerType { |
665 | fn can_cast(kind: SyntaxKind) -> bool { kind == POINTER_TYPE } | 545 | fn can_cast(kind: SyntaxKind) -> bool { kind == POINTER_TYPE } |
666 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 546 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -681,11 +561,6 @@ impl PointerType { | |||
681 | pub struct ArrayType { | 561 | pub struct ArrayType { |
682 | pub(crate) syntax: SyntaxNode, | 562 | pub(crate) syntax: SyntaxNode, |
683 | } | 563 | } |
684 | impl std::fmt::Display for ArrayType { | ||
685 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
686 | std::fmt::Display::fmt(self.syntax(), f) | ||
687 | } | ||
688 | } | ||
689 | impl AstNode for ArrayType { | 564 | impl AstNode for ArrayType { |
690 | fn can_cast(kind: SyntaxKind) -> bool { kind == ARRAY_TYPE } | 565 | fn can_cast(kind: SyntaxKind) -> bool { kind == ARRAY_TYPE } |
691 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 566 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -708,11 +583,6 @@ impl ArrayType { | |||
708 | pub struct SliceType { | 583 | pub struct SliceType { |
709 | pub(crate) syntax: SyntaxNode, | 584 | pub(crate) syntax: SyntaxNode, |
710 | } | 585 | } |
711 | impl std::fmt::Display for SliceType { | ||
712 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
713 | std::fmt::Display::fmt(self.syntax(), f) | ||
714 | } | ||
715 | } | ||
716 | impl AstNode for SliceType { | 586 | impl AstNode for SliceType { |
717 | fn can_cast(kind: SyntaxKind) -> bool { kind == SLICE_TYPE } | 587 | fn can_cast(kind: SyntaxKind) -> bool { kind == SLICE_TYPE } |
718 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 588 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -733,11 +603,6 @@ impl SliceType { | |||
733 | pub struct ReferenceType { | 603 | pub struct ReferenceType { |
734 | pub(crate) syntax: SyntaxNode, | 604 | pub(crate) syntax: SyntaxNode, |
735 | } | 605 | } |
736 | impl std::fmt::Display for ReferenceType { | ||
737 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
738 | std::fmt::Display::fmt(self.syntax(), f) | ||
739 | } | ||
740 | } | ||
741 | impl AstNode for ReferenceType { | 606 | impl AstNode for ReferenceType { |
742 | fn can_cast(kind: SyntaxKind) -> bool { kind == REFERENCE_TYPE } | 607 | fn can_cast(kind: SyntaxKind) -> bool { kind == REFERENCE_TYPE } |
743 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 608 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -759,11 +624,6 @@ impl ReferenceType { | |||
759 | pub struct PlaceholderType { | 624 | pub struct PlaceholderType { |
760 | pub(crate) syntax: SyntaxNode, | 625 | pub(crate) syntax: SyntaxNode, |
761 | } | 626 | } |
762 | impl std::fmt::Display for PlaceholderType { | ||
763 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
764 | std::fmt::Display::fmt(self.syntax(), f) | ||
765 | } | ||
766 | } | ||
767 | impl AstNode for PlaceholderType { | 627 | impl AstNode for PlaceholderType { |
768 | fn can_cast(kind: SyntaxKind) -> bool { kind == PLACEHOLDER_TYPE } | 628 | fn can_cast(kind: SyntaxKind) -> bool { kind == PLACEHOLDER_TYPE } |
769 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 629 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -782,11 +642,6 @@ impl PlaceholderType { | |||
782 | pub struct FnPointerType { | 642 | pub struct FnPointerType { |
783 | pub(crate) syntax: SyntaxNode, | 643 | pub(crate) syntax: SyntaxNode, |
784 | } | 644 | } |
785 | impl std::fmt::Display for FnPointerType { | ||
786 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
787 | std::fmt::Display::fmt(self.syntax(), f) | ||
788 | } | ||
789 | } | ||
790 | impl AstNode for FnPointerType { | 645 | impl AstNode for FnPointerType { |
791 | fn can_cast(kind: SyntaxKind) -> bool { kind == FN_POINTER_TYPE } | 646 | fn can_cast(kind: SyntaxKind) -> bool { kind == FN_POINTER_TYPE } |
792 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 647 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -809,11 +664,6 @@ impl FnPointerType { | |||
809 | pub struct ForType { | 664 | pub struct ForType { |
810 | pub(crate) syntax: SyntaxNode, | 665 | pub(crate) syntax: SyntaxNode, |
811 | } | 666 | } |
812 | impl std::fmt::Display for ForType { | ||
813 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
814 | std::fmt::Display::fmt(self.syntax(), f) | ||
815 | } | ||
816 | } | ||
817 | impl AstNode for ForType { | 667 | impl AstNode for ForType { |
818 | fn can_cast(kind: SyntaxKind) -> bool { kind == FOR_TYPE } | 668 | fn can_cast(kind: SyntaxKind) -> bool { kind == FOR_TYPE } |
819 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 669 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -834,11 +684,6 @@ impl ForType { | |||
834 | pub struct ImplTraitType { | 684 | pub struct ImplTraitType { |
835 | pub(crate) syntax: SyntaxNode, | 685 | pub(crate) syntax: SyntaxNode, |
836 | } | 686 | } |
837 | impl std::fmt::Display for ImplTraitType { | ||
838 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
839 | std::fmt::Display::fmt(self.syntax(), f) | ||
840 | } | ||
841 | } | ||
842 | impl AstNode for ImplTraitType { | 687 | impl AstNode for ImplTraitType { |
843 | fn can_cast(kind: SyntaxKind) -> bool { kind == IMPL_TRAIT_TYPE } | 688 | fn can_cast(kind: SyntaxKind) -> bool { kind == IMPL_TRAIT_TYPE } |
844 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 689 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -858,11 +703,6 @@ impl ImplTraitType { | |||
858 | pub struct DynTraitType { | 703 | pub struct DynTraitType { |
859 | pub(crate) syntax: SyntaxNode, | 704 | pub(crate) syntax: SyntaxNode, |
860 | } | 705 | } |
861 | impl std::fmt::Display for DynTraitType { | ||
862 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
863 | std::fmt::Display::fmt(self.syntax(), f) | ||
864 | } | ||
865 | } | ||
866 | impl AstNode for DynTraitType { | 706 | impl AstNode for DynTraitType { |
867 | fn can_cast(kind: SyntaxKind) -> bool { kind == DYN_TRAIT_TYPE } | 707 | fn can_cast(kind: SyntaxKind) -> bool { kind == DYN_TRAIT_TYPE } |
868 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 708 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -882,11 +722,6 @@ impl DynTraitType { | |||
882 | pub struct TupleExpr { | 722 | pub struct TupleExpr { |
883 | pub(crate) syntax: SyntaxNode, | 723 | pub(crate) syntax: SyntaxNode, |
884 | } | 724 | } |
885 | impl std::fmt::Display for TupleExpr { | ||
886 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
887 | std::fmt::Display::fmt(self.syntax(), f) | ||
888 | } | ||
889 | } | ||
890 | impl AstNode for TupleExpr { | 725 | impl AstNode for TupleExpr { |
891 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_EXPR } | 726 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_EXPR } |
892 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 727 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -908,11 +743,6 @@ impl TupleExpr { | |||
908 | pub struct ArrayExpr { | 743 | pub struct ArrayExpr { |
909 | pub(crate) syntax: SyntaxNode, | 744 | pub(crate) syntax: SyntaxNode, |
910 | } | 745 | } |
911 | impl std::fmt::Display for ArrayExpr { | ||
912 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
913 | std::fmt::Display::fmt(self.syntax(), f) | ||
914 | } | ||
915 | } | ||
916 | impl AstNode for ArrayExpr { | 746 | impl AstNode for ArrayExpr { |
917 | fn can_cast(kind: SyntaxKind) -> bool { kind == ARRAY_EXPR } | 747 | fn can_cast(kind: SyntaxKind) -> bool { kind == ARRAY_EXPR } |
918 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 748 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -935,11 +765,6 @@ impl ArrayExpr { | |||
935 | pub struct ParenExpr { | 765 | pub struct ParenExpr { |
936 | pub(crate) syntax: SyntaxNode, | 766 | pub(crate) syntax: SyntaxNode, |
937 | } | 767 | } |
938 | impl std::fmt::Display for ParenExpr { | ||
939 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
940 | std::fmt::Display::fmt(self.syntax(), f) | ||
941 | } | ||
942 | } | ||
943 | impl AstNode for ParenExpr { | 768 | impl AstNode for ParenExpr { |
944 | fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_EXPR } | 769 | fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_EXPR } |
945 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 770 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -961,11 +786,6 @@ impl ParenExpr { | |||
961 | pub struct PathExpr { | 786 | pub struct PathExpr { |
962 | pub(crate) syntax: SyntaxNode, | 787 | pub(crate) syntax: SyntaxNode, |
963 | } | 788 | } |
964 | impl std::fmt::Display for PathExpr { | ||
965 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
966 | std::fmt::Display::fmt(self.syntax(), f) | ||
967 | } | ||
968 | } | ||
969 | impl AstNode for PathExpr { | 789 | impl AstNode for PathExpr { |
970 | fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_EXPR } | 790 | fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_EXPR } |
971 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 791 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -984,11 +804,6 @@ impl PathExpr { | |||
984 | pub struct LambdaExpr { | 804 | pub struct LambdaExpr { |
985 | pub(crate) syntax: SyntaxNode, | 805 | pub(crate) syntax: SyntaxNode, |
986 | } | 806 | } |
987 | impl std::fmt::Display for LambdaExpr { | ||
988 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
989 | std::fmt::Display::fmt(self.syntax(), f) | ||
990 | } | ||
991 | } | ||
992 | impl AstNode for LambdaExpr { | 807 | impl AstNode for LambdaExpr { |
993 | fn can_cast(kind: SyntaxKind) -> bool { kind == LAMBDA_EXPR } | 808 | fn can_cast(kind: SyntaxKind) -> bool { kind == LAMBDA_EXPR } |
994 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 809 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1013,11 +828,6 @@ impl LambdaExpr { | |||
1013 | pub struct IfExpr { | 828 | pub struct IfExpr { |
1014 | pub(crate) syntax: SyntaxNode, | 829 | pub(crate) syntax: SyntaxNode, |
1015 | } | 830 | } |
1016 | impl std::fmt::Display for IfExpr { | ||
1017 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1018 | std::fmt::Display::fmt(self.syntax(), f) | ||
1019 | } | ||
1020 | } | ||
1021 | impl AstNode for IfExpr { | 831 | impl AstNode for IfExpr { |
1022 | fn can_cast(kind: SyntaxKind) -> bool { kind == IF_EXPR } | 832 | fn can_cast(kind: SyntaxKind) -> bool { kind == IF_EXPR } |
1023 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 833 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1038,11 +848,6 @@ impl IfExpr { | |||
1038 | pub struct LoopExpr { | 848 | pub struct LoopExpr { |
1039 | pub(crate) syntax: SyntaxNode, | 849 | pub(crate) syntax: SyntaxNode, |
1040 | } | 850 | } |
1041 | impl std::fmt::Display for LoopExpr { | ||
1042 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1043 | std::fmt::Display::fmt(self.syntax(), f) | ||
1044 | } | ||
1045 | } | ||
1046 | impl AstNode for LoopExpr { | 851 | impl AstNode for LoopExpr { |
1047 | fn can_cast(kind: SyntaxKind) -> bool { kind == LOOP_EXPR } | 852 | fn can_cast(kind: SyntaxKind) -> bool { kind == LOOP_EXPR } |
1048 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 853 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1063,11 +868,6 @@ impl LoopExpr { | |||
1063 | pub struct TryBlockExpr { | 868 | pub struct TryBlockExpr { |
1064 | pub(crate) syntax: SyntaxNode, | 869 | pub(crate) syntax: SyntaxNode, |
1065 | } | 870 | } |
1066 | impl std::fmt::Display for TryBlockExpr { | ||
1067 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1068 | std::fmt::Display::fmt(self.syntax(), f) | ||
1069 | } | ||
1070 | } | ||
1071 | impl AstNode for TryBlockExpr { | 871 | impl AstNode for TryBlockExpr { |
1072 | fn can_cast(kind: SyntaxKind) -> bool { kind == TRY_BLOCK_EXPR } | 872 | fn can_cast(kind: SyntaxKind) -> bool { kind == TRY_BLOCK_EXPR } |
1073 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 873 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1088,11 +888,6 @@ impl TryBlockExpr { | |||
1088 | pub struct ForExpr { | 888 | pub struct ForExpr { |
1089 | pub(crate) syntax: SyntaxNode, | 889 | pub(crate) syntax: SyntaxNode, |
1090 | } | 890 | } |
1091 | impl std::fmt::Display for ForExpr { | ||
1092 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1093 | std::fmt::Display::fmt(self.syntax(), f) | ||
1094 | } | ||
1095 | } | ||
1096 | impl AstNode for ForExpr { | 891 | impl AstNode for ForExpr { |
1097 | fn can_cast(kind: SyntaxKind) -> bool { kind == FOR_EXPR } | 892 | fn can_cast(kind: SyntaxKind) -> bool { kind == FOR_EXPR } |
1098 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 893 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1116,11 +911,6 @@ impl ForExpr { | |||
1116 | pub struct WhileExpr { | 911 | pub struct WhileExpr { |
1117 | pub(crate) syntax: SyntaxNode, | 912 | pub(crate) syntax: SyntaxNode, |
1118 | } | 913 | } |
1119 | impl std::fmt::Display for WhileExpr { | ||
1120 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1121 | std::fmt::Display::fmt(self.syntax(), f) | ||
1122 | } | ||
1123 | } | ||
1124 | impl AstNode for WhileExpr { | 914 | impl AstNode for WhileExpr { |
1125 | fn can_cast(kind: SyntaxKind) -> bool { kind == WHILE_EXPR } | 915 | fn can_cast(kind: SyntaxKind) -> bool { kind == WHILE_EXPR } |
1126 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 916 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1142,11 +932,6 @@ impl WhileExpr { | |||
1142 | pub struct ContinueExpr { | 932 | pub struct ContinueExpr { |
1143 | pub(crate) syntax: SyntaxNode, | 933 | pub(crate) syntax: SyntaxNode, |
1144 | } | 934 | } |
1145 | impl std::fmt::Display for ContinueExpr { | ||
1146 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1147 | std::fmt::Display::fmt(self.syntax(), f) | ||
1148 | } | ||
1149 | } | ||
1150 | impl AstNode for ContinueExpr { | 935 | impl AstNode for ContinueExpr { |
1151 | fn can_cast(kind: SyntaxKind) -> bool { kind == CONTINUE_EXPR } | 936 | fn can_cast(kind: SyntaxKind) -> bool { kind == CONTINUE_EXPR } |
1152 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 937 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1167,11 +952,6 @@ impl ContinueExpr { | |||
1167 | pub struct BreakExpr { | 952 | pub struct BreakExpr { |
1168 | pub(crate) syntax: SyntaxNode, | 953 | pub(crate) syntax: SyntaxNode, |
1169 | } | 954 | } |
1170 | impl std::fmt::Display for BreakExpr { | ||
1171 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1172 | std::fmt::Display::fmt(self.syntax(), f) | ||
1173 | } | ||
1174 | } | ||
1175 | impl AstNode for BreakExpr { | 955 | impl AstNode for BreakExpr { |
1176 | fn can_cast(kind: SyntaxKind) -> bool { kind == BREAK_EXPR } | 956 | fn can_cast(kind: SyntaxKind) -> bool { kind == BREAK_EXPR } |
1177 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 957 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1193,11 +973,6 @@ impl BreakExpr { | |||
1193 | pub struct Label { | 973 | pub struct Label { |
1194 | pub(crate) syntax: SyntaxNode, | 974 | pub(crate) syntax: SyntaxNode, |
1195 | } | 975 | } |
1196 | impl std::fmt::Display for Label { | ||
1197 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1198 | std::fmt::Display::fmt(self.syntax(), f) | ||
1199 | } | ||
1200 | } | ||
1201 | impl AstNode for Label { | 976 | impl AstNode for Label { |
1202 | fn can_cast(kind: SyntaxKind) -> bool { kind == LABEL } | 977 | fn can_cast(kind: SyntaxKind) -> bool { kind == LABEL } |
1203 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 978 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1216,11 +991,6 @@ impl Label { | |||
1216 | pub struct BlockExpr { | 991 | pub struct BlockExpr { |
1217 | pub(crate) syntax: SyntaxNode, | 992 | pub(crate) syntax: SyntaxNode, |
1218 | } | 993 | } |
1219 | impl std::fmt::Display for BlockExpr { | ||
1220 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1221 | std::fmt::Display::fmt(self.syntax(), f) | ||
1222 | } | ||
1223 | } | ||
1224 | impl AstNode for BlockExpr { | 994 | impl AstNode for BlockExpr { |
1225 | fn can_cast(kind: SyntaxKind) -> bool { kind == BLOCK_EXPR } | 995 | fn can_cast(kind: SyntaxKind) -> bool { kind == BLOCK_EXPR } |
1226 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 996 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1242,11 +1012,6 @@ impl BlockExpr { | |||
1242 | pub struct ReturnExpr { | 1012 | pub struct ReturnExpr { |
1243 | pub(crate) syntax: SyntaxNode, | 1013 | pub(crate) syntax: SyntaxNode, |
1244 | } | 1014 | } |
1245 | impl std::fmt::Display for ReturnExpr { | ||
1246 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1247 | std::fmt::Display::fmt(self.syntax(), f) | ||
1248 | } | ||
1249 | } | ||
1250 | impl AstNode for ReturnExpr { | 1015 | impl AstNode for ReturnExpr { |
1251 | fn can_cast(kind: SyntaxKind) -> bool { kind == RETURN_EXPR } | 1016 | fn can_cast(kind: SyntaxKind) -> bool { kind == RETURN_EXPR } |
1252 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1017 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1266,11 +1031,6 @@ impl ReturnExpr { | |||
1266 | pub struct CallExpr { | 1031 | pub struct CallExpr { |
1267 | pub(crate) syntax: SyntaxNode, | 1032 | pub(crate) syntax: SyntaxNode, |
1268 | } | 1033 | } |
1269 | impl std::fmt::Display for CallExpr { | ||
1270 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1271 | std::fmt::Display::fmt(self.syntax(), f) | ||
1272 | } | ||
1273 | } | ||
1274 | impl AstNode for CallExpr { | 1034 | impl AstNode for CallExpr { |
1275 | fn can_cast(kind: SyntaxKind) -> bool { kind == CALL_EXPR } | 1035 | fn can_cast(kind: SyntaxKind) -> bool { kind == CALL_EXPR } |
1276 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1036 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1290,11 +1050,6 @@ impl CallExpr { | |||
1290 | pub struct MethodCallExpr { | 1050 | pub struct MethodCallExpr { |
1291 | pub(crate) syntax: SyntaxNode, | 1051 | pub(crate) syntax: SyntaxNode, |
1292 | } | 1052 | } |
1293 | impl std::fmt::Display for MethodCallExpr { | ||
1294 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1295 | std::fmt::Display::fmt(self.syntax(), f) | ||
1296 | } | ||
1297 | } | ||
1298 | impl AstNode for MethodCallExpr { | 1053 | impl AstNode for MethodCallExpr { |
1299 | fn can_cast(kind: SyntaxKind) -> bool { kind == METHOD_CALL_EXPR } | 1054 | fn can_cast(kind: SyntaxKind) -> bool { kind == METHOD_CALL_EXPR } |
1300 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1055 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1318,11 +1073,6 @@ impl MethodCallExpr { | |||
1318 | pub struct IndexExpr { | 1073 | pub struct IndexExpr { |
1319 | pub(crate) syntax: SyntaxNode, | 1074 | pub(crate) syntax: SyntaxNode, |
1320 | } | 1075 | } |
1321 | impl std::fmt::Display for IndexExpr { | ||
1322 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1323 | std::fmt::Display::fmt(self.syntax(), f) | ||
1324 | } | ||
1325 | } | ||
1326 | impl AstNode for IndexExpr { | 1076 | impl AstNode for IndexExpr { |
1327 | fn can_cast(kind: SyntaxKind) -> bool { kind == INDEX_EXPR } | 1077 | fn can_cast(kind: SyntaxKind) -> bool { kind == INDEX_EXPR } |
1328 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1078 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1343,11 +1093,6 @@ impl IndexExpr { | |||
1343 | pub struct FieldExpr { | 1093 | pub struct FieldExpr { |
1344 | pub(crate) syntax: SyntaxNode, | 1094 | pub(crate) syntax: SyntaxNode, |
1345 | } | 1095 | } |
1346 | impl std::fmt::Display for FieldExpr { | ||
1347 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1348 | std::fmt::Display::fmt(self.syntax(), f) | ||
1349 | } | ||
1350 | } | ||
1351 | impl AstNode for FieldExpr { | 1096 | impl AstNode for FieldExpr { |
1352 | fn can_cast(kind: SyntaxKind) -> bool { kind == FIELD_EXPR } | 1097 | fn can_cast(kind: SyntaxKind) -> bool { kind == FIELD_EXPR } |
1353 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1098 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1369,11 +1114,6 @@ impl FieldExpr { | |||
1369 | pub struct AwaitExpr { | 1114 | pub struct AwaitExpr { |
1370 | pub(crate) syntax: SyntaxNode, | 1115 | pub(crate) syntax: SyntaxNode, |
1371 | } | 1116 | } |
1372 | impl std::fmt::Display for AwaitExpr { | ||
1373 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1374 | std::fmt::Display::fmt(self.syntax(), f) | ||
1375 | } | ||
1376 | } | ||
1377 | impl AstNode for AwaitExpr { | 1117 | impl AstNode for AwaitExpr { |
1378 | fn can_cast(kind: SyntaxKind) -> bool { kind == AWAIT_EXPR } | 1118 | fn can_cast(kind: SyntaxKind) -> bool { kind == AWAIT_EXPR } |
1379 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1119 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1395,11 +1135,6 @@ impl AwaitExpr { | |||
1395 | pub struct TryExpr { | 1135 | pub struct TryExpr { |
1396 | pub(crate) syntax: SyntaxNode, | 1136 | pub(crate) syntax: SyntaxNode, |
1397 | } | 1137 | } |
1398 | impl std::fmt::Display for TryExpr { | ||
1399 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1400 | std::fmt::Display::fmt(self.syntax(), f) | ||
1401 | } | ||
1402 | } | ||
1403 | impl AstNode for TryExpr { | 1138 | impl AstNode for TryExpr { |
1404 | fn can_cast(kind: SyntaxKind) -> bool { kind == TRY_EXPR } | 1139 | fn can_cast(kind: SyntaxKind) -> bool { kind == TRY_EXPR } |
1405 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1140 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1420,11 +1155,6 @@ impl TryExpr { | |||
1420 | pub struct CastExpr { | 1155 | pub struct CastExpr { |
1421 | pub(crate) syntax: SyntaxNode, | 1156 | pub(crate) syntax: SyntaxNode, |
1422 | } | 1157 | } |
1423 | impl std::fmt::Display for CastExpr { | ||
1424 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1425 | std::fmt::Display::fmt(self.syntax(), f) | ||
1426 | } | ||
1427 | } | ||
1428 | impl AstNode for CastExpr { | 1158 | impl AstNode for CastExpr { |
1429 | fn can_cast(kind: SyntaxKind) -> bool { kind == CAST_EXPR } | 1159 | fn can_cast(kind: SyntaxKind) -> bool { kind == CAST_EXPR } |
1430 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1160 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1446,11 +1176,6 @@ impl CastExpr { | |||
1446 | pub struct RefExpr { | 1176 | pub struct RefExpr { |
1447 | pub(crate) syntax: SyntaxNode, | 1177 | pub(crate) syntax: SyntaxNode, |
1448 | } | 1178 | } |
1449 | impl std::fmt::Display for RefExpr { | ||
1450 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1451 | std::fmt::Display::fmt(self.syntax(), f) | ||
1452 | } | ||
1453 | } | ||
1454 | impl AstNode for RefExpr { | 1179 | impl AstNode for RefExpr { |
1455 | fn can_cast(kind: SyntaxKind) -> bool { kind == REF_EXPR } | 1180 | fn can_cast(kind: SyntaxKind) -> bool { kind == REF_EXPR } |
1456 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1181 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1473,11 +1198,6 @@ impl RefExpr { | |||
1473 | pub struct PrefixExpr { | 1198 | pub struct PrefixExpr { |
1474 | pub(crate) syntax: SyntaxNode, | 1199 | pub(crate) syntax: SyntaxNode, |
1475 | } | 1200 | } |
1476 | impl std::fmt::Display for PrefixExpr { | ||
1477 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1478 | std::fmt::Display::fmt(self.syntax(), f) | ||
1479 | } | ||
1480 | } | ||
1481 | impl AstNode for PrefixExpr { | 1201 | impl AstNode for PrefixExpr { |
1482 | fn can_cast(kind: SyntaxKind) -> bool { kind == PREFIX_EXPR } | 1202 | fn can_cast(kind: SyntaxKind) -> bool { kind == PREFIX_EXPR } |
1483 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1203 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1498,11 +1218,6 @@ impl PrefixExpr { | |||
1498 | pub struct BoxExpr { | 1218 | pub struct BoxExpr { |
1499 | pub(crate) syntax: SyntaxNode, | 1219 | pub(crate) syntax: SyntaxNode, |
1500 | } | 1220 | } |
1501 | impl std::fmt::Display for BoxExpr { | ||
1502 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1503 | std::fmt::Display::fmt(self.syntax(), f) | ||
1504 | } | ||
1505 | } | ||
1506 | impl AstNode for BoxExpr { | 1221 | impl AstNode for BoxExpr { |
1507 | fn can_cast(kind: SyntaxKind) -> bool { kind == BOX_EXPR } | 1222 | fn can_cast(kind: SyntaxKind) -> bool { kind == BOX_EXPR } |
1508 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1223 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1523,11 +1238,6 @@ impl BoxExpr { | |||
1523 | pub struct RangeExpr { | 1238 | pub struct RangeExpr { |
1524 | pub(crate) syntax: SyntaxNode, | 1239 | pub(crate) syntax: SyntaxNode, |
1525 | } | 1240 | } |
1526 | impl std::fmt::Display for RangeExpr { | ||
1527 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1528 | std::fmt::Display::fmt(self.syntax(), f) | ||
1529 | } | ||
1530 | } | ||
1531 | impl AstNode for RangeExpr { | 1241 | impl AstNode for RangeExpr { |
1532 | fn can_cast(kind: SyntaxKind) -> bool { kind == RANGE_EXPR } | 1242 | fn can_cast(kind: SyntaxKind) -> bool { kind == RANGE_EXPR } |
1533 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1243 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1547,11 +1257,6 @@ impl RangeExpr { | |||
1547 | pub struct BinExpr { | 1257 | pub struct BinExpr { |
1548 | pub(crate) syntax: SyntaxNode, | 1258 | pub(crate) syntax: SyntaxNode, |
1549 | } | 1259 | } |
1550 | impl std::fmt::Display for BinExpr { | ||
1551 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1552 | std::fmt::Display::fmt(self.syntax(), f) | ||
1553 | } | ||
1554 | } | ||
1555 | impl AstNode for BinExpr { | 1260 | impl AstNode for BinExpr { |
1556 | fn can_cast(kind: SyntaxKind) -> bool { kind == BIN_EXPR } | 1261 | fn can_cast(kind: SyntaxKind) -> bool { kind == BIN_EXPR } |
1557 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1262 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1571,11 +1276,6 @@ impl BinExpr { | |||
1571 | pub struct Literal { | 1276 | pub struct Literal { |
1572 | pub(crate) syntax: SyntaxNode, | 1277 | pub(crate) syntax: SyntaxNode, |
1573 | } | 1278 | } |
1574 | impl std::fmt::Display for Literal { | ||
1575 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1576 | std::fmt::Display::fmt(self.syntax(), f) | ||
1577 | } | ||
1578 | } | ||
1579 | impl AstNode for Literal { | 1279 | impl AstNode for Literal { |
1580 | fn can_cast(kind: SyntaxKind) -> bool { kind == LITERAL } | 1280 | fn can_cast(kind: SyntaxKind) -> bool { kind == LITERAL } |
1581 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1281 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1594,11 +1294,6 @@ impl Literal { | |||
1594 | pub struct MatchExpr { | 1294 | pub struct MatchExpr { |
1595 | pub(crate) syntax: SyntaxNode, | 1295 | pub(crate) syntax: SyntaxNode, |
1596 | } | 1296 | } |
1597 | impl std::fmt::Display for MatchExpr { | ||
1598 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1599 | std::fmt::Display::fmt(self.syntax(), f) | ||
1600 | } | ||
1601 | } | ||
1602 | impl AstNode for MatchExpr { | 1297 | impl AstNode for MatchExpr { |
1603 | fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_EXPR } | 1298 | fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_EXPR } |
1604 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1299 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1620,11 +1315,6 @@ impl MatchExpr { | |||
1620 | pub struct MatchArmList { | 1315 | pub struct MatchArmList { |
1621 | pub(crate) syntax: SyntaxNode, | 1316 | pub(crate) syntax: SyntaxNode, |
1622 | } | 1317 | } |
1623 | impl std::fmt::Display for MatchArmList { | ||
1624 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1625 | std::fmt::Display::fmt(self.syntax(), f) | ||
1626 | } | ||
1627 | } | ||
1628 | impl AstNode for MatchArmList { | 1318 | impl AstNode for MatchArmList { |
1629 | fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_ARM_LIST } | 1319 | fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_ARM_LIST } |
1630 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1320 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1646,11 +1336,6 @@ impl MatchArmList { | |||
1646 | pub struct MatchArm { | 1336 | pub struct MatchArm { |
1647 | pub(crate) syntax: SyntaxNode, | 1337 | pub(crate) syntax: SyntaxNode, |
1648 | } | 1338 | } |
1649 | impl std::fmt::Display for MatchArm { | ||
1650 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1651 | std::fmt::Display::fmt(self.syntax(), f) | ||
1652 | } | ||
1653 | } | ||
1654 | impl AstNode for MatchArm { | 1339 | impl AstNode for MatchArm { |
1655 | fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_ARM } | 1340 | fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_ARM } |
1656 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1341 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1673,11 +1358,6 @@ impl MatchArm { | |||
1673 | pub struct MatchGuard { | 1358 | pub struct MatchGuard { |
1674 | pub(crate) syntax: SyntaxNode, | 1359 | pub(crate) syntax: SyntaxNode, |
1675 | } | 1360 | } |
1676 | impl std::fmt::Display for MatchGuard { | ||
1677 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1678 | std::fmt::Display::fmt(self.syntax(), f) | ||
1679 | } | ||
1680 | } | ||
1681 | impl AstNode for MatchGuard { | 1361 | impl AstNode for MatchGuard { |
1682 | fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_GUARD } | 1362 | fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_GUARD } |
1683 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1363 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1697,11 +1377,6 @@ impl MatchGuard { | |||
1697 | pub struct RecordLit { | 1377 | pub struct RecordLit { |
1698 | pub(crate) syntax: SyntaxNode, | 1378 | pub(crate) syntax: SyntaxNode, |
1699 | } | 1379 | } |
1700 | impl std::fmt::Display for RecordLit { | ||
1701 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1702 | std::fmt::Display::fmt(self.syntax(), f) | ||
1703 | } | ||
1704 | } | ||
1705 | impl AstNode for RecordLit { | 1380 | impl AstNode for RecordLit { |
1706 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_LIT } | 1381 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_LIT } |
1707 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1382 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1721,11 +1396,6 @@ impl RecordLit { | |||
1721 | pub struct RecordFieldList { | 1396 | pub struct RecordFieldList { |
1722 | pub(crate) syntax: SyntaxNode, | 1397 | pub(crate) syntax: SyntaxNode, |
1723 | } | 1398 | } |
1724 | impl std::fmt::Display for RecordFieldList { | ||
1725 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1726 | std::fmt::Display::fmt(self.syntax(), f) | ||
1727 | } | ||
1728 | } | ||
1729 | impl AstNode for RecordFieldList { | 1399 | impl AstNode for RecordFieldList { |
1730 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_LIST } | 1400 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_LIST } |
1731 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1401 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1748,11 +1418,6 @@ impl RecordFieldList { | |||
1748 | pub struct RecordField { | 1418 | pub struct RecordField { |
1749 | pub(crate) syntax: SyntaxNode, | 1419 | pub(crate) syntax: SyntaxNode, |
1750 | } | 1420 | } |
1751 | impl std::fmt::Display for RecordField { | ||
1752 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1753 | std::fmt::Display::fmt(self.syntax(), f) | ||
1754 | } | ||
1755 | } | ||
1756 | impl AstNode for RecordField { | 1421 | impl AstNode for RecordField { |
1757 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD } | 1422 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD } |
1758 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1423 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1774,11 +1439,6 @@ impl RecordField { | |||
1774 | pub struct OrPat { | 1439 | pub struct OrPat { |
1775 | pub(crate) syntax: SyntaxNode, | 1440 | pub(crate) syntax: SyntaxNode, |
1776 | } | 1441 | } |
1777 | impl std::fmt::Display for OrPat { | ||
1778 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1779 | std::fmt::Display::fmt(self.syntax(), f) | ||
1780 | } | ||
1781 | } | ||
1782 | impl AstNode for OrPat { | 1442 | impl AstNode for OrPat { |
1783 | fn can_cast(kind: SyntaxKind) -> bool { kind == OR_PAT } | 1443 | fn can_cast(kind: SyntaxKind) -> bool { kind == OR_PAT } |
1784 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1444 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1797,11 +1457,6 @@ impl OrPat { | |||
1797 | pub struct ParenPat { | 1457 | pub struct ParenPat { |
1798 | pub(crate) syntax: SyntaxNode, | 1458 | pub(crate) syntax: SyntaxNode, |
1799 | } | 1459 | } |
1800 | impl std::fmt::Display for ParenPat { | ||
1801 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1802 | std::fmt::Display::fmt(self.syntax(), f) | ||
1803 | } | ||
1804 | } | ||
1805 | impl AstNode for ParenPat { | 1460 | impl AstNode for ParenPat { |
1806 | fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_PAT } | 1461 | fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_PAT } |
1807 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1462 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1822,11 +1477,6 @@ impl ParenPat { | |||
1822 | pub struct RefPat { | 1477 | pub struct RefPat { |
1823 | pub(crate) syntax: SyntaxNode, | 1478 | pub(crate) syntax: SyntaxNode, |
1824 | } | 1479 | } |
1825 | impl std::fmt::Display for RefPat { | ||
1826 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1827 | std::fmt::Display::fmt(self.syntax(), f) | ||
1828 | } | ||
1829 | } | ||
1830 | impl AstNode for RefPat { | 1480 | impl AstNode for RefPat { |
1831 | fn can_cast(kind: SyntaxKind) -> bool { kind == REF_PAT } | 1481 | fn can_cast(kind: SyntaxKind) -> bool { kind == REF_PAT } |
1832 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1482 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1847,11 +1497,6 @@ impl RefPat { | |||
1847 | pub struct BoxPat { | 1497 | pub struct BoxPat { |
1848 | pub(crate) syntax: SyntaxNode, | 1498 | pub(crate) syntax: SyntaxNode, |
1849 | } | 1499 | } |
1850 | impl std::fmt::Display for BoxPat { | ||
1851 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1852 | std::fmt::Display::fmt(self.syntax(), f) | ||
1853 | } | ||
1854 | } | ||
1855 | impl AstNode for BoxPat { | 1500 | impl AstNode for BoxPat { |
1856 | fn can_cast(kind: SyntaxKind) -> bool { kind == BOX_PAT } | 1501 | fn can_cast(kind: SyntaxKind) -> bool { kind == BOX_PAT } |
1857 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1502 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1871,11 +1516,6 @@ impl BoxPat { | |||
1871 | pub struct BindPat { | 1516 | pub struct BindPat { |
1872 | pub(crate) syntax: SyntaxNode, | 1517 | pub(crate) syntax: SyntaxNode, |
1873 | } | 1518 | } |
1874 | impl std::fmt::Display for BindPat { | ||
1875 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1876 | std::fmt::Display::fmt(self.syntax(), f) | ||
1877 | } | ||
1878 | } | ||
1879 | impl AstNode for BindPat { | 1519 | impl AstNode for BindPat { |
1880 | fn can_cast(kind: SyntaxKind) -> bool { kind == BIND_PAT } | 1520 | fn can_cast(kind: SyntaxKind) -> bool { kind == BIND_PAT } |
1881 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1521 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1898,11 +1538,6 @@ impl BindPat { | |||
1898 | pub struct PlaceholderPat { | 1538 | pub struct PlaceholderPat { |
1899 | pub(crate) syntax: SyntaxNode, | 1539 | pub(crate) syntax: SyntaxNode, |
1900 | } | 1540 | } |
1901 | impl std::fmt::Display for PlaceholderPat { | ||
1902 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1903 | std::fmt::Display::fmt(self.syntax(), f) | ||
1904 | } | ||
1905 | } | ||
1906 | impl AstNode for PlaceholderPat { | 1541 | impl AstNode for PlaceholderPat { |
1907 | fn can_cast(kind: SyntaxKind) -> bool { kind == PLACEHOLDER_PAT } | 1542 | fn can_cast(kind: SyntaxKind) -> bool { kind == PLACEHOLDER_PAT } |
1908 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1543 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1921,11 +1556,6 @@ impl PlaceholderPat { | |||
1921 | pub struct DotDotPat { | 1556 | pub struct DotDotPat { |
1922 | pub(crate) syntax: SyntaxNode, | 1557 | pub(crate) syntax: SyntaxNode, |
1923 | } | 1558 | } |
1924 | impl std::fmt::Display for DotDotPat { | ||
1925 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1926 | std::fmt::Display::fmt(self.syntax(), f) | ||
1927 | } | ||
1928 | } | ||
1929 | impl AstNode for DotDotPat { | 1559 | impl AstNode for DotDotPat { |
1930 | fn can_cast(kind: SyntaxKind) -> bool { kind == DOT_DOT_PAT } | 1560 | fn can_cast(kind: SyntaxKind) -> bool { kind == DOT_DOT_PAT } |
1931 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1561 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1944,11 +1574,6 @@ impl DotDotPat { | |||
1944 | pub struct PathPat { | 1574 | pub struct PathPat { |
1945 | pub(crate) syntax: SyntaxNode, | 1575 | pub(crate) syntax: SyntaxNode, |
1946 | } | 1576 | } |
1947 | impl std::fmt::Display for PathPat { | ||
1948 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1949 | std::fmt::Display::fmt(self.syntax(), f) | ||
1950 | } | ||
1951 | } | ||
1952 | impl AstNode for PathPat { | 1577 | impl AstNode for PathPat { |
1953 | fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_PAT } | 1578 | fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_PAT } |
1954 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1579 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1967,11 +1592,6 @@ impl PathPat { | |||
1967 | pub struct SlicePat { | 1592 | pub struct SlicePat { |
1968 | pub(crate) syntax: SyntaxNode, | 1593 | pub(crate) syntax: SyntaxNode, |
1969 | } | 1594 | } |
1970 | impl std::fmt::Display for SlicePat { | ||
1971 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1972 | std::fmt::Display::fmt(self.syntax(), f) | ||
1973 | } | ||
1974 | } | ||
1975 | impl AstNode for SlicePat { | 1595 | impl AstNode for SlicePat { |
1976 | fn can_cast(kind: SyntaxKind) -> bool { kind == SLICE_PAT } | 1596 | fn can_cast(kind: SyntaxKind) -> bool { kind == SLICE_PAT } |
1977 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1597 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1992,11 +1612,6 @@ impl SlicePat { | |||
1992 | pub struct RangePat { | 1612 | pub struct RangePat { |
1993 | pub(crate) syntax: SyntaxNode, | 1613 | pub(crate) syntax: SyntaxNode, |
1994 | } | 1614 | } |
1995 | impl std::fmt::Display for RangePat { | ||
1996 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
1997 | std::fmt::Display::fmt(self.syntax(), f) | ||
1998 | } | ||
1999 | } | ||
2000 | impl AstNode for RangePat { | 1615 | impl AstNode for RangePat { |
2001 | fn can_cast(kind: SyntaxKind) -> bool { kind == RANGE_PAT } | 1616 | fn can_cast(kind: SyntaxKind) -> bool { kind == RANGE_PAT } |
2002 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1617 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2015,11 +1630,6 @@ impl RangePat { | |||
2015 | pub struct LiteralPat { | 1630 | pub struct LiteralPat { |
2016 | pub(crate) syntax: SyntaxNode, | 1631 | pub(crate) syntax: SyntaxNode, |
2017 | } | 1632 | } |
2018 | impl std::fmt::Display for LiteralPat { | ||
2019 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2020 | std::fmt::Display::fmt(self.syntax(), f) | ||
2021 | } | ||
2022 | } | ||
2023 | impl AstNode for LiteralPat { | 1633 | impl AstNode for LiteralPat { |
2024 | fn can_cast(kind: SyntaxKind) -> bool { kind == LITERAL_PAT } | 1634 | fn can_cast(kind: SyntaxKind) -> bool { kind == LITERAL_PAT } |
2025 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1635 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2038,11 +1648,6 @@ impl LiteralPat { | |||
2038 | pub struct MacroPat { | 1648 | pub struct MacroPat { |
2039 | pub(crate) syntax: SyntaxNode, | 1649 | pub(crate) syntax: SyntaxNode, |
2040 | } | 1650 | } |
2041 | impl std::fmt::Display for MacroPat { | ||
2042 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2043 | std::fmt::Display::fmt(self.syntax(), f) | ||
2044 | } | ||
2045 | } | ||
2046 | impl AstNode for MacroPat { | 1651 | impl AstNode for MacroPat { |
2047 | fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_PAT } | 1652 | fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_PAT } |
2048 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1653 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2061,11 +1666,6 @@ impl MacroPat { | |||
2061 | pub struct RecordPat { | 1666 | pub struct RecordPat { |
2062 | pub(crate) syntax: SyntaxNode, | 1667 | pub(crate) syntax: SyntaxNode, |
2063 | } | 1668 | } |
2064 | impl std::fmt::Display for RecordPat { | ||
2065 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2066 | std::fmt::Display::fmt(self.syntax(), f) | ||
2067 | } | ||
2068 | } | ||
2069 | impl AstNode for RecordPat { | 1669 | impl AstNode for RecordPat { |
2070 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_PAT } | 1670 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_PAT } |
2071 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1671 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2087,11 +1687,6 @@ impl RecordPat { | |||
2087 | pub struct RecordFieldPatList { | 1687 | pub struct RecordFieldPatList { |
2088 | pub(crate) syntax: SyntaxNode, | 1688 | pub(crate) syntax: SyntaxNode, |
2089 | } | 1689 | } |
2090 | impl std::fmt::Display for RecordFieldPatList { | ||
2091 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2092 | std::fmt::Display::fmt(self.syntax(), f) | ||
2093 | } | ||
2094 | } | ||
2095 | impl AstNode for RecordFieldPatList { | 1690 | impl AstNode for RecordFieldPatList { |
2096 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_PAT_LIST } | 1691 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_PAT_LIST } |
2097 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1692 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2117,11 +1712,6 @@ impl RecordFieldPatList { | |||
2117 | pub struct RecordFieldPat { | 1712 | pub struct RecordFieldPat { |
2118 | pub(crate) syntax: SyntaxNode, | 1713 | pub(crate) syntax: SyntaxNode, |
2119 | } | 1714 | } |
2120 | impl std::fmt::Display for RecordFieldPat { | ||
2121 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2122 | std::fmt::Display::fmt(self.syntax(), f) | ||
2123 | } | ||
2124 | } | ||
2125 | impl AstNode for RecordFieldPat { | 1715 | impl AstNode for RecordFieldPat { |
2126 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_PAT } | 1716 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_PAT } |
2127 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1717 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2143,11 +1733,6 @@ impl RecordFieldPat { | |||
2143 | pub struct TupleStructPat { | 1733 | pub struct TupleStructPat { |
2144 | pub(crate) syntax: SyntaxNode, | 1734 | pub(crate) syntax: SyntaxNode, |
2145 | } | 1735 | } |
2146 | impl std::fmt::Display for TupleStructPat { | ||
2147 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2148 | std::fmt::Display::fmt(self.syntax(), f) | ||
2149 | } | ||
2150 | } | ||
2151 | impl AstNode for TupleStructPat { | 1736 | impl AstNode for TupleStructPat { |
2152 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_STRUCT_PAT } | 1737 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_STRUCT_PAT } |
2153 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1738 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2169,11 +1754,6 @@ impl TupleStructPat { | |||
2169 | pub struct TuplePat { | 1754 | pub struct TuplePat { |
2170 | pub(crate) syntax: SyntaxNode, | 1755 | pub(crate) syntax: SyntaxNode, |
2171 | } | 1756 | } |
2172 | impl std::fmt::Display for TuplePat { | ||
2173 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2174 | std::fmt::Display::fmt(self.syntax(), f) | ||
2175 | } | ||
2176 | } | ||
2177 | impl AstNode for TuplePat { | 1757 | impl AstNode for TuplePat { |
2178 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_PAT } | 1758 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_PAT } |
2179 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1759 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2194,11 +1774,6 @@ impl TuplePat { | |||
2194 | pub struct Visibility { | 1774 | pub struct Visibility { |
2195 | pub(crate) syntax: SyntaxNode, | 1775 | pub(crate) syntax: SyntaxNode, |
2196 | } | 1776 | } |
2197 | impl std::fmt::Display for Visibility { | ||
2198 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2199 | std::fmt::Display::fmt(self.syntax(), f) | ||
2200 | } | ||
2201 | } | ||
2202 | impl AstNode for Visibility { | 1777 | impl AstNode for Visibility { |
2203 | fn can_cast(kind: SyntaxKind) -> bool { kind == VISIBILITY } | 1778 | fn can_cast(kind: SyntaxKind) -> bool { kind == VISIBILITY } |
2204 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1779 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2220,11 +1795,6 @@ impl Visibility { | |||
2220 | pub struct Name { | 1795 | pub struct Name { |
2221 | pub(crate) syntax: SyntaxNode, | 1796 | pub(crate) syntax: SyntaxNode, |
2222 | } | 1797 | } |
2223 | impl std::fmt::Display for Name { | ||
2224 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2225 | std::fmt::Display::fmt(self.syntax(), f) | ||
2226 | } | ||
2227 | } | ||
2228 | impl AstNode for Name { | 1798 | impl AstNode for Name { |
2229 | fn can_cast(kind: SyntaxKind) -> bool { kind == NAME } | 1799 | fn can_cast(kind: SyntaxKind) -> bool { kind == NAME } |
2230 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1800 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2243,11 +1813,6 @@ impl Name { | |||
2243 | pub struct NameRef { | 1813 | pub struct NameRef { |
2244 | pub(crate) syntax: SyntaxNode, | 1814 | pub(crate) syntax: SyntaxNode, |
2245 | } | 1815 | } |
2246 | impl std::fmt::Display for NameRef { | ||
2247 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2248 | std::fmt::Display::fmt(self.syntax(), f) | ||
2249 | } | ||
2250 | } | ||
2251 | impl AstNode for NameRef { | 1816 | impl AstNode for NameRef { |
2252 | fn can_cast(kind: SyntaxKind) -> bool { kind == NAME_REF } | 1817 | fn can_cast(kind: SyntaxKind) -> bool { kind == NAME_REF } |
2253 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1818 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2266,11 +1831,6 @@ impl NameRef { | |||
2266 | pub struct MacroCall { | 1831 | pub struct MacroCall { |
2267 | pub(crate) syntax: SyntaxNode, | 1832 | pub(crate) syntax: SyntaxNode, |
2268 | } | 1833 | } |
2269 | impl std::fmt::Display for MacroCall { | ||
2270 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2271 | std::fmt::Display::fmt(self.syntax(), f) | ||
2272 | } | ||
2273 | } | ||
2274 | impl AstNode for MacroCall { | 1834 | impl AstNode for MacroCall { |
2275 | fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_CALL } | 1835 | fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_CALL } |
2276 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1836 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2295,11 +1855,6 @@ impl MacroCall { | |||
2295 | pub struct Attr { | 1855 | pub struct Attr { |
2296 | pub(crate) syntax: SyntaxNode, | 1856 | pub(crate) syntax: SyntaxNode, |
2297 | } | 1857 | } |
2298 | impl std::fmt::Display for Attr { | ||
2299 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2300 | std::fmt::Display::fmt(self.syntax(), f) | ||
2301 | } | ||
2302 | } | ||
2303 | impl AstNode for Attr { | 1858 | impl AstNode for Attr { |
2304 | fn can_cast(kind: SyntaxKind) -> bool { kind == ATTR } | 1859 | fn can_cast(kind: SyntaxKind) -> bool { kind == ATTR } |
2305 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1860 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2324,11 +1879,6 @@ impl Attr { | |||
2324 | pub struct TokenTree { | 1879 | pub struct TokenTree { |
2325 | pub(crate) syntax: SyntaxNode, | 1880 | pub(crate) syntax: SyntaxNode, |
2326 | } | 1881 | } |
2327 | impl std::fmt::Display for TokenTree { | ||
2328 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2329 | std::fmt::Display::fmt(self.syntax(), f) | ||
2330 | } | ||
2331 | } | ||
2332 | impl AstNode for TokenTree { | 1882 | impl AstNode for TokenTree { |
2333 | fn can_cast(kind: SyntaxKind) -> bool { kind == TOKEN_TREE } | 1883 | fn can_cast(kind: SyntaxKind) -> bool { kind == TOKEN_TREE } |
2334 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1884 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2345,11 +1895,6 @@ impl TokenTree {} | |||
2345 | pub struct TypeParamList { | 1895 | pub struct TypeParamList { |
2346 | pub(crate) syntax: SyntaxNode, | 1896 | pub(crate) syntax: SyntaxNode, |
2347 | } | 1897 | } |
2348 | impl std::fmt::Display for TypeParamList { | ||
2349 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2350 | std::fmt::Display::fmt(self.syntax(), f) | ||
2351 | } | ||
2352 | } | ||
2353 | impl AstNode for TypeParamList { | 1898 | impl AstNode for TypeParamList { |
2354 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_PARAM_LIST } | 1899 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_PARAM_LIST } |
2355 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1900 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2373,11 +1918,6 @@ impl TypeParamList { | |||
2373 | pub struct TypeParam { | 1918 | pub struct TypeParam { |
2374 | pub(crate) syntax: SyntaxNode, | 1919 | pub(crate) syntax: SyntaxNode, |
2375 | } | 1920 | } |
2376 | impl std::fmt::Display for TypeParam { | ||
2377 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2378 | std::fmt::Display::fmt(self.syntax(), f) | ||
2379 | } | ||
2380 | } | ||
2381 | impl AstNode for TypeParam { | 1921 | impl AstNode for TypeParam { |
2382 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_PARAM } | 1922 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_PARAM } |
2383 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1923 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2400,11 +1940,6 @@ impl TypeParam { | |||
2400 | pub struct ConstParam { | 1940 | pub struct ConstParam { |
2401 | pub(crate) syntax: SyntaxNode, | 1941 | pub(crate) syntax: SyntaxNode, |
2402 | } | 1942 | } |
2403 | impl std::fmt::Display for ConstParam { | ||
2404 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2405 | std::fmt::Display::fmt(self.syntax(), f) | ||
2406 | } | ||
2407 | } | ||
2408 | impl AstNode for ConstParam { | 1943 | impl AstNode for ConstParam { |
2409 | fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_PARAM } | 1944 | fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_PARAM } |
2410 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1945 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2427,11 +1962,6 @@ impl ConstParam { | |||
2427 | pub struct LifetimeParam { | 1962 | pub struct LifetimeParam { |
2428 | pub(crate) syntax: SyntaxNode, | 1963 | pub(crate) syntax: SyntaxNode, |
2429 | } | 1964 | } |
2430 | impl std::fmt::Display for LifetimeParam { | ||
2431 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2432 | std::fmt::Display::fmt(self.syntax(), f) | ||
2433 | } | ||
2434 | } | ||
2435 | impl AstNode for LifetimeParam { | 1965 | impl AstNode for LifetimeParam { |
2436 | fn can_cast(kind: SyntaxKind) -> bool { kind == LIFETIME_PARAM } | 1966 | fn can_cast(kind: SyntaxKind) -> bool { kind == LIFETIME_PARAM } |
2437 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1967 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2451,11 +1981,6 @@ impl LifetimeParam { | |||
2451 | pub struct TypeBound { | 1981 | pub struct TypeBound { |
2452 | pub(crate) syntax: SyntaxNode, | 1982 | pub(crate) syntax: SyntaxNode, |
2453 | } | 1983 | } |
2454 | impl std::fmt::Display for TypeBound { | ||
2455 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2456 | std::fmt::Display::fmt(self.syntax(), f) | ||
2457 | } | ||
2458 | } | ||
2459 | impl AstNode for TypeBound { | 1984 | impl AstNode for TypeBound { |
2460 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND } | 1985 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND } |
2461 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1986 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2476,11 +2001,6 @@ impl TypeBound { | |||
2476 | pub struct TypeBoundList { | 2001 | pub struct TypeBoundList { |
2477 | pub(crate) syntax: SyntaxNode, | 2002 | pub(crate) syntax: SyntaxNode, |
2478 | } | 2003 | } |
2479 | impl std::fmt::Display for TypeBoundList { | ||
2480 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2481 | std::fmt::Display::fmt(self.syntax(), f) | ||
2482 | } | ||
2483 | } | ||
2484 | impl AstNode for TypeBoundList { | 2004 | impl AstNode for TypeBoundList { |
2485 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND_LIST } | 2005 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND_LIST } |
2486 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2006 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2499,11 +2019,6 @@ impl TypeBoundList { | |||
2499 | pub struct WherePred { | 2019 | pub struct WherePred { |
2500 | pub(crate) syntax: SyntaxNode, | 2020 | pub(crate) syntax: SyntaxNode, |
2501 | } | 2021 | } |
2502 | impl std::fmt::Display for WherePred { | ||
2503 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2504 | std::fmt::Display::fmt(self.syntax(), f) | ||
2505 | } | ||
2506 | } | ||
2507 | impl AstNode for WherePred { | 2022 | impl AstNode for WherePred { |
2508 | fn can_cast(kind: SyntaxKind) -> bool { kind == WHERE_PRED } | 2023 | fn can_cast(kind: SyntaxKind) -> bool { kind == WHERE_PRED } |
2509 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2024 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2524,11 +2039,6 @@ impl WherePred { | |||
2524 | pub struct WhereClause { | 2039 | pub struct WhereClause { |
2525 | pub(crate) syntax: SyntaxNode, | 2040 | pub(crate) syntax: SyntaxNode, |
2526 | } | 2041 | } |
2527 | impl std::fmt::Display for WhereClause { | ||
2528 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2529 | std::fmt::Display::fmt(self.syntax(), f) | ||
2530 | } | ||
2531 | } | ||
2532 | impl AstNode for WhereClause { | 2042 | impl AstNode for WhereClause { |
2533 | fn can_cast(kind: SyntaxKind) -> bool { kind == WHERE_CLAUSE } | 2043 | fn can_cast(kind: SyntaxKind) -> bool { kind == WHERE_CLAUSE } |
2534 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2044 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2548,11 +2058,6 @@ impl WhereClause { | |||
2548 | pub struct Abi { | 2058 | pub struct Abi { |
2549 | pub(crate) syntax: SyntaxNode, | 2059 | pub(crate) syntax: SyntaxNode, |
2550 | } | 2060 | } |
2551 | impl std::fmt::Display for Abi { | ||
2552 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2553 | std::fmt::Display::fmt(self.syntax(), f) | ||
2554 | } | ||
2555 | } | ||
2556 | impl AstNode for Abi { | 2061 | impl AstNode for Abi { |
2557 | fn can_cast(kind: SyntaxKind) -> bool { kind == ABI } | 2062 | fn can_cast(kind: SyntaxKind) -> bool { kind == ABI } |
2558 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2063 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2571,11 +2076,6 @@ impl Abi { | |||
2571 | pub struct ExprStmt { | 2076 | pub struct ExprStmt { |
2572 | pub(crate) syntax: SyntaxNode, | 2077 | pub(crate) syntax: SyntaxNode, |
2573 | } | 2078 | } |
2574 | impl std::fmt::Display for ExprStmt { | ||
2575 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2576 | std::fmt::Display::fmt(self.syntax(), f) | ||
2577 | } | ||
2578 | } | ||
2579 | impl AstNode for ExprStmt { | 2079 | impl AstNode for ExprStmt { |
2580 | fn can_cast(kind: SyntaxKind) -> bool { kind == EXPR_STMT } | 2080 | fn can_cast(kind: SyntaxKind) -> bool { kind == EXPR_STMT } |
2581 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2081 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2596,11 +2096,6 @@ impl ExprStmt { | |||
2596 | pub struct LetStmt { | 2096 | pub struct LetStmt { |
2597 | pub(crate) syntax: SyntaxNode, | 2097 | pub(crate) syntax: SyntaxNode, |
2598 | } | 2098 | } |
2599 | impl std::fmt::Display for LetStmt { | ||
2600 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2601 | std::fmt::Display::fmt(self.syntax(), f) | ||
2602 | } | ||
2603 | } | ||
2604 | impl AstNode for LetStmt { | 2099 | impl AstNode for LetStmt { |
2605 | fn can_cast(kind: SyntaxKind) -> bool { kind == LET_STMT } | 2100 | fn can_cast(kind: SyntaxKind) -> bool { kind == LET_STMT } |
2606 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2101 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2624,11 +2119,6 @@ impl LetStmt { | |||
2624 | pub struct Condition { | 2119 | pub struct Condition { |
2625 | pub(crate) syntax: SyntaxNode, | 2120 | pub(crate) syntax: SyntaxNode, |
2626 | } | 2121 | } |
2627 | impl std::fmt::Display for Condition { | ||
2628 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2629 | std::fmt::Display::fmt(self.syntax(), f) | ||
2630 | } | ||
2631 | } | ||
2632 | impl AstNode for Condition { | 2122 | impl AstNode for Condition { |
2633 | fn can_cast(kind: SyntaxKind) -> bool { kind == CONDITION } | 2123 | fn can_cast(kind: SyntaxKind) -> bool { kind == CONDITION } |
2634 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2124 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2650,11 +2140,6 @@ impl Condition { | |||
2650 | pub struct Block { | 2140 | pub struct Block { |
2651 | pub(crate) syntax: SyntaxNode, | 2141 | pub(crate) syntax: SyntaxNode, |
2652 | } | 2142 | } |
2653 | impl std::fmt::Display for Block { | ||
2654 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2655 | std::fmt::Display::fmt(self.syntax(), f) | ||
2656 | } | ||
2657 | } | ||
2658 | impl AstNode for Block { | 2143 | impl AstNode for Block { |
2659 | fn can_cast(kind: SyntaxKind) -> bool { kind == BLOCK } | 2144 | fn can_cast(kind: SyntaxKind) -> bool { kind == BLOCK } |
2660 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2145 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2678,11 +2163,6 @@ impl Block { | |||
2678 | pub struct ParamList { | 2163 | pub struct ParamList { |
2679 | pub(crate) syntax: SyntaxNode, | 2164 | pub(crate) syntax: SyntaxNode, |
2680 | } | 2165 | } |
2681 | impl std::fmt::Display for ParamList { | ||
2682 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2683 | std::fmt::Display::fmt(self.syntax(), f) | ||
2684 | } | ||
2685 | } | ||
2686 | impl AstNode for ParamList { | 2166 | impl AstNode for ParamList { |
2687 | fn can_cast(kind: SyntaxKind) -> bool { kind == PARAM_LIST } | 2167 | fn can_cast(kind: SyntaxKind) -> bool { kind == PARAM_LIST } |
2688 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2168 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2704,11 +2184,6 @@ impl ParamList { | |||
2704 | pub struct SelfParam { | 2184 | pub struct SelfParam { |
2705 | pub(crate) syntax: SyntaxNode, | 2185 | pub(crate) syntax: SyntaxNode, |
2706 | } | 2186 | } |
2707 | impl std::fmt::Display for SelfParam { | ||
2708 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2709 | std::fmt::Display::fmt(self.syntax(), f) | ||
2710 | } | ||
2711 | } | ||
2712 | impl AstNode for SelfParam { | 2187 | impl AstNode for SelfParam { |
2713 | fn can_cast(kind: SyntaxKind) -> bool { kind == SELF_PARAM } | 2188 | fn can_cast(kind: SyntaxKind) -> bool { kind == SELF_PARAM } |
2714 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2189 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2731,11 +2206,6 @@ impl SelfParam { | |||
2731 | pub struct Param { | 2206 | pub struct Param { |
2732 | pub(crate) syntax: SyntaxNode, | 2207 | pub(crate) syntax: SyntaxNode, |
2733 | } | 2208 | } |
2734 | impl std::fmt::Display for Param { | ||
2735 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2736 | std::fmt::Display::fmt(self.syntax(), f) | ||
2737 | } | ||
2738 | } | ||
2739 | impl AstNode for Param { | 2209 | impl AstNode for Param { |
2740 | fn can_cast(kind: SyntaxKind) -> bool { kind == PARAM } | 2210 | fn can_cast(kind: SyntaxKind) -> bool { kind == PARAM } |
2741 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2211 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2757,11 +2227,6 @@ impl Param { | |||
2757 | pub struct UseItem { | 2227 | pub struct UseItem { |
2758 | pub(crate) syntax: SyntaxNode, | 2228 | pub(crate) syntax: SyntaxNode, |
2759 | } | 2229 | } |
2760 | impl std::fmt::Display for UseItem { | ||
2761 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2762 | std::fmt::Display::fmt(self.syntax(), f) | ||
2763 | } | ||
2764 | } | ||
2765 | impl AstNode for UseItem { | 2230 | impl AstNode for UseItem { |
2766 | fn can_cast(kind: SyntaxKind) -> bool { kind == USE_ITEM } | 2231 | fn can_cast(kind: SyntaxKind) -> bool { kind == USE_ITEM } |
2767 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2232 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2783,11 +2248,6 @@ impl UseItem { | |||
2783 | pub struct UseTree { | 2248 | pub struct UseTree { |
2784 | pub(crate) syntax: SyntaxNode, | 2249 | pub(crate) syntax: SyntaxNode, |
2785 | } | 2250 | } |
2786 | impl std::fmt::Display for UseTree { | ||
2787 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2788 | std::fmt::Display::fmt(self.syntax(), f) | ||
2789 | } | ||
2790 | } | ||
2791 | impl AstNode for UseTree { | 2251 | impl AstNode for UseTree { |
2792 | fn can_cast(kind: SyntaxKind) -> bool { kind == USE_TREE } | 2252 | fn can_cast(kind: SyntaxKind) -> bool { kind == USE_TREE } |
2793 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2253 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2809,11 +2269,6 @@ impl UseTree { | |||
2809 | pub struct Alias { | 2269 | pub struct Alias { |
2810 | pub(crate) syntax: SyntaxNode, | 2270 | pub(crate) syntax: SyntaxNode, |
2811 | } | 2271 | } |
2812 | impl std::fmt::Display for Alias { | ||
2813 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2814 | std::fmt::Display::fmt(self.syntax(), f) | ||
2815 | } | ||
2816 | } | ||
2817 | impl AstNode for Alias { | 2272 | impl AstNode for Alias { |
2818 | fn can_cast(kind: SyntaxKind) -> bool { kind == ALIAS } | 2273 | fn can_cast(kind: SyntaxKind) -> bool { kind == ALIAS } |
2819 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2274 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2833,11 +2288,6 @@ impl Alias { | |||
2833 | pub struct UseTreeList { | 2288 | pub struct UseTreeList { |
2834 | pub(crate) syntax: SyntaxNode, | 2289 | pub(crate) syntax: SyntaxNode, |
2835 | } | 2290 | } |
2836 | impl std::fmt::Display for UseTreeList { | ||
2837 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2838 | std::fmt::Display::fmt(self.syntax(), f) | ||
2839 | } | ||
2840 | } | ||
2841 | impl AstNode for UseTreeList { | 2291 | impl AstNode for UseTreeList { |
2842 | fn can_cast(kind: SyntaxKind) -> bool { kind == USE_TREE_LIST } | 2292 | fn can_cast(kind: SyntaxKind) -> bool { kind == USE_TREE_LIST } |
2843 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2293 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2858,11 +2308,6 @@ impl UseTreeList { | |||
2858 | pub struct ExternCrateItem { | 2308 | pub struct ExternCrateItem { |
2859 | pub(crate) syntax: SyntaxNode, | 2309 | pub(crate) syntax: SyntaxNode, |
2860 | } | 2310 | } |
2861 | impl std::fmt::Display for ExternCrateItem { | ||
2862 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2863 | std::fmt::Display::fmt(self.syntax(), f) | ||
2864 | } | ||
2865 | } | ||
2866 | impl AstNode for ExternCrateItem { | 2311 | impl AstNode for ExternCrateItem { |
2867 | fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_CRATE_ITEM } | 2312 | fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_CRATE_ITEM } |
2868 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2313 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2886,11 +2331,6 @@ impl ExternCrateItem { | |||
2886 | pub struct ArgList { | 2331 | pub struct ArgList { |
2887 | pub(crate) syntax: SyntaxNode, | 2332 | pub(crate) syntax: SyntaxNode, |
2888 | } | 2333 | } |
2889 | impl std::fmt::Display for ArgList { | ||
2890 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2891 | std::fmt::Display::fmt(self.syntax(), f) | ||
2892 | } | ||
2893 | } | ||
2894 | impl AstNode for ArgList { | 2334 | impl AstNode for ArgList { |
2895 | fn can_cast(kind: SyntaxKind) -> bool { kind == ARG_LIST } | 2335 | fn can_cast(kind: SyntaxKind) -> bool { kind == ARG_LIST } |
2896 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2336 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2911,11 +2351,6 @@ impl ArgList { | |||
2911 | pub struct Path { | 2351 | pub struct Path { |
2912 | pub(crate) syntax: SyntaxNode, | 2352 | pub(crate) syntax: SyntaxNode, |
2913 | } | 2353 | } |
2914 | impl std::fmt::Display for Path { | ||
2915 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2916 | std::fmt::Display::fmt(self.syntax(), f) | ||
2917 | } | ||
2918 | } | ||
2919 | impl AstNode for Path { | 2354 | impl AstNode for Path { |
2920 | fn can_cast(kind: SyntaxKind) -> bool { kind == PATH } | 2355 | fn can_cast(kind: SyntaxKind) -> bool { kind == PATH } |
2921 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2356 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2935,11 +2370,6 @@ impl Path { | |||
2935 | pub struct PathSegment { | 2370 | pub struct PathSegment { |
2936 | pub(crate) syntax: SyntaxNode, | 2371 | pub(crate) syntax: SyntaxNode, |
2937 | } | 2372 | } |
2938 | impl std::fmt::Display for PathSegment { | ||
2939 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2940 | std::fmt::Display::fmt(self.syntax(), f) | ||
2941 | } | ||
2942 | } | ||
2943 | impl AstNode for PathSegment { | 2373 | impl AstNode for PathSegment { |
2944 | fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_SEGMENT } | 2374 | fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_SEGMENT } |
2945 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2375 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2965,11 +2395,6 @@ impl PathSegment { | |||
2965 | pub struct TypeArgList { | 2395 | pub struct TypeArgList { |
2966 | pub(crate) syntax: SyntaxNode, | 2396 | pub(crate) syntax: SyntaxNode, |
2967 | } | 2397 | } |
2968 | impl std::fmt::Display for TypeArgList { | ||
2969 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
2970 | std::fmt::Display::fmt(self.syntax(), f) | ||
2971 | } | ||
2972 | } | ||
2973 | impl AstNode for TypeArgList { | 2398 | impl AstNode for TypeArgList { |
2974 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ARG_LIST } | 2399 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ARG_LIST } |
2975 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2400 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2995,11 +2420,6 @@ impl TypeArgList { | |||
2995 | pub struct TypeArg { | 2420 | pub struct TypeArg { |
2996 | pub(crate) syntax: SyntaxNode, | 2421 | pub(crate) syntax: SyntaxNode, |
2997 | } | 2422 | } |
2998 | impl std::fmt::Display for TypeArg { | ||
2999 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3000 | std::fmt::Display::fmt(self.syntax(), f) | ||
3001 | } | ||
3002 | } | ||
3003 | impl AstNode for TypeArg { | 2423 | impl AstNode for TypeArg { |
3004 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ARG } | 2424 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ARG } |
3005 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2425 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -3018,11 +2438,6 @@ impl TypeArg { | |||
3018 | pub struct AssocTypeArg { | 2438 | pub struct AssocTypeArg { |
3019 | pub(crate) syntax: SyntaxNode, | 2439 | pub(crate) syntax: SyntaxNode, |
3020 | } | 2440 | } |
3021 | impl std::fmt::Display for AssocTypeArg { | ||
3022 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3023 | std::fmt::Display::fmt(self.syntax(), f) | ||
3024 | } | ||
3025 | } | ||
3026 | impl AstNode for AssocTypeArg { | 2441 | impl AstNode for AssocTypeArg { |
3027 | fn can_cast(kind: SyntaxKind) -> bool { kind == ASSOC_TYPE_ARG } | 2442 | fn can_cast(kind: SyntaxKind) -> bool { kind == ASSOC_TYPE_ARG } |
3028 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2443 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -3044,11 +2459,6 @@ impl AssocTypeArg { | |||
3044 | pub struct LifetimeArg { | 2459 | pub struct LifetimeArg { |
3045 | pub(crate) syntax: SyntaxNode, | 2460 | pub(crate) syntax: SyntaxNode, |
3046 | } | 2461 | } |
3047 | impl std::fmt::Display for LifetimeArg { | ||
3048 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3049 | std::fmt::Display::fmt(self.syntax(), f) | ||
3050 | } | ||
3051 | } | ||
3052 | impl AstNode for LifetimeArg { | 2462 | impl AstNode for LifetimeArg { |
3053 | fn can_cast(kind: SyntaxKind) -> bool { kind == LIFETIME_ARG } | 2463 | fn can_cast(kind: SyntaxKind) -> bool { kind == LIFETIME_ARG } |
3054 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2464 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -3067,11 +2477,6 @@ impl LifetimeArg { | |||
3067 | pub struct ConstArg { | 2477 | pub struct ConstArg { |
3068 | pub(crate) syntax: SyntaxNode, | 2478 | pub(crate) syntax: SyntaxNode, |
3069 | } | 2479 | } |
3070 | impl std::fmt::Display for ConstArg { | ||
3071 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3072 | std::fmt::Display::fmt(self.syntax(), f) | ||
3073 | } | ||
3074 | } | ||
3075 | impl AstNode for ConstArg { | 2480 | impl AstNode for ConstArg { |
3076 | fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_ARG } | 2481 | fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_ARG } |
3077 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2482 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -3092,11 +2497,6 @@ impl ConstArg { | |||
3092 | pub struct MacroItems { | 2497 | pub struct MacroItems { |
3093 | pub(crate) syntax: SyntaxNode, | 2498 | pub(crate) syntax: SyntaxNode, |
3094 | } | 2499 | } |
3095 | impl std::fmt::Display for MacroItems { | ||
3096 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3097 | std::fmt::Display::fmt(self.syntax(), f) | ||
3098 | } | ||
3099 | } | ||
3100 | impl AstNode for MacroItems { | 2500 | impl AstNode for MacroItems { |
3101 | fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_ITEMS } | 2501 | fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_ITEMS } |
3102 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2502 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -3115,11 +2515,6 @@ impl MacroItems {} | |||
3115 | pub struct MacroStmts { | 2515 | pub struct MacroStmts { |
3116 | pub(crate) syntax: SyntaxNode, | 2516 | pub(crate) syntax: SyntaxNode, |
3117 | } | 2517 | } |
3118 | impl std::fmt::Display for MacroStmts { | ||
3119 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3120 | std::fmt::Display::fmt(self.syntax(), f) | ||
3121 | } | ||
3122 | } | ||
3123 | impl AstNode for MacroStmts { | 2518 | impl AstNode for MacroStmts { |
3124 | fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_STMTS } | 2519 | fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_STMTS } |
3125 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2520 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -3139,11 +2534,6 @@ impl MacroStmts { | |||
3139 | pub struct ExternItemList { | 2534 | pub struct ExternItemList { |
3140 | pub(crate) syntax: SyntaxNode, | 2535 | pub(crate) syntax: SyntaxNode, |
3141 | } | 2536 | } |
3142 | impl std::fmt::Display for ExternItemList { | ||
3143 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3144 | std::fmt::Display::fmt(self.syntax(), f) | ||
3145 | } | ||
3146 | } | ||
3147 | impl AstNode for ExternItemList { | 2537 | impl AstNode for ExternItemList { |
3148 | fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_ITEM_LIST } | 2538 | fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_ITEM_LIST } |
3149 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2539 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -3166,11 +2556,6 @@ impl ExternItemList { | |||
3166 | pub struct ExternBlock { | 2556 | pub struct ExternBlock { |
3167 | pub(crate) syntax: SyntaxNode, | 2557 | pub(crate) syntax: SyntaxNode, |
3168 | } | 2558 | } |
3169 | impl std::fmt::Display for ExternBlock { | ||
3170 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3171 | std::fmt::Display::fmt(self.syntax(), f) | ||
3172 | } | ||
3173 | } | ||
3174 | impl AstNode for ExternBlock { | 2559 | impl AstNode for ExternBlock { |
3175 | fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_BLOCK } | 2560 | fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_BLOCK } |
3176 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2561 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -3190,11 +2575,6 @@ impl ExternBlock { | |||
3190 | pub struct MetaItem { | 2575 | pub struct MetaItem { |
3191 | pub(crate) syntax: SyntaxNode, | 2576 | pub(crate) syntax: SyntaxNode, |
3192 | } | 2577 | } |
3193 | impl std::fmt::Display for MetaItem { | ||
3194 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3195 | std::fmt::Display::fmt(self.syntax(), f) | ||
3196 | } | ||
3197 | } | ||
3198 | impl AstNode for MetaItem { | 2578 | impl AstNode for MetaItem { |
3199 | fn can_cast(kind: SyntaxKind) -> bool { kind == META_ITEM } | 2579 | fn can_cast(kind: SyntaxKind) -> bool { kind == META_ITEM } |
3200 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2580 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -3216,11 +2596,6 @@ impl MetaItem { | |||
3216 | pub struct MacroDef { | 2596 | pub struct MacroDef { |
3217 | pub(crate) syntax: SyntaxNode, | 2597 | pub(crate) syntax: SyntaxNode, |
3218 | } | 2598 | } |
3219 | impl std::fmt::Display for MacroDef { | ||
3220 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3221 | std::fmt::Display::fmt(self.syntax(), f) | ||
3222 | } | ||
3223 | } | ||
3224 | impl AstNode for MacroDef { | 2599 | impl AstNode for MacroDef { |
3225 | fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_DEF } | 2600 | fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_DEF } |
3226 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2601 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -3251,11 +2626,6 @@ impl From<EnumDef> for NominalDef { | |||
3251 | impl From<UnionDef> for NominalDef { | 2626 | impl From<UnionDef> for NominalDef { |
3252 | fn from(node: UnionDef) -> NominalDef { NominalDef::UnionDef(node) } | 2627 | fn from(node: UnionDef) -> NominalDef { NominalDef::UnionDef(node) } |
3253 | } | 2628 | } |
3254 | impl std::fmt::Display for NominalDef { | ||
3255 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3256 | std::fmt::Display::fmt(self.syntax(), f) | ||
3257 | } | ||
3258 | } | ||
3259 | impl AstNode for NominalDef { | 2629 | impl AstNode for NominalDef { |
3260 | fn can_cast(kind: SyntaxKind) -> bool { | 2630 | fn can_cast(kind: SyntaxKind) -> bool { |
3261 | match kind { | 2631 | match kind { |
@@ -3298,11 +2668,6 @@ impl From<TypeParam> for GenericParam { | |||
3298 | impl From<ConstParam> for GenericParam { | 2668 | impl From<ConstParam> for GenericParam { |
3299 | fn from(node: ConstParam) -> GenericParam { GenericParam::ConstParam(node) } | 2669 | fn from(node: ConstParam) -> GenericParam { GenericParam::ConstParam(node) } |
3300 | } | 2670 | } |
3301 | impl std::fmt::Display for GenericParam { | ||
3302 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3303 | std::fmt::Display::fmt(self.syntax(), f) | ||
3304 | } | ||
3305 | } | ||
3306 | impl AstNode for GenericParam { | 2671 | impl AstNode for GenericParam { |
3307 | fn can_cast(kind: SyntaxKind) -> bool { | 2672 | fn can_cast(kind: SyntaxKind) -> bool { |
3308 | match kind { | 2673 | match kind { |
@@ -3346,11 +2711,6 @@ impl From<ConstArg> for GenericArg { | |||
3346 | impl From<AssocTypeArg> for GenericArg { | 2711 | impl From<AssocTypeArg> for GenericArg { |
3347 | fn from(node: AssocTypeArg) -> GenericArg { GenericArg::AssocTypeArg(node) } | 2712 | fn from(node: AssocTypeArg) -> GenericArg { GenericArg::AssocTypeArg(node) } |
3348 | } | 2713 | } |
3349 | impl std::fmt::Display for GenericArg { | ||
3350 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3351 | std::fmt::Display::fmt(self.syntax(), f) | ||
3352 | } | ||
3353 | } | ||
3354 | impl AstNode for GenericArg { | 2714 | impl AstNode for GenericArg { |
3355 | fn can_cast(kind: SyntaxKind) -> bool { | 2715 | fn can_cast(kind: SyntaxKind) -> bool { |
3356 | match kind { | 2716 | match kind { |
@@ -3432,11 +2792,6 @@ impl From<ImplTraitType> for TypeRef { | |||
3432 | impl From<DynTraitType> for TypeRef { | 2792 | impl From<DynTraitType> for TypeRef { |
3433 | fn from(node: DynTraitType) -> TypeRef { TypeRef::DynTraitType(node) } | 2793 | fn from(node: DynTraitType) -> TypeRef { TypeRef::DynTraitType(node) } |
3434 | } | 2794 | } |
3435 | impl std::fmt::Display for TypeRef { | ||
3436 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3437 | std::fmt::Display::fmt(self.syntax(), f) | ||
3438 | } | ||
3439 | } | ||
3440 | impl AstNode for TypeRef { | 2795 | impl AstNode for TypeRef { |
3441 | fn can_cast(kind: SyntaxKind) -> bool { | 2796 | fn can_cast(kind: SyntaxKind) -> bool { |
3442 | match kind { | 2797 | match kind { |
@@ -3542,11 +2897,6 @@ impl From<MacroCall> for ModuleItem { | |||
3542 | impl From<ExternBlock> for ModuleItem { | 2897 | impl From<ExternBlock> for ModuleItem { |
3543 | fn from(node: ExternBlock) -> ModuleItem { ModuleItem::ExternBlock(node) } | 2898 | fn from(node: ExternBlock) -> ModuleItem { ModuleItem::ExternBlock(node) } |
3544 | } | 2899 | } |
3545 | impl std::fmt::Display for ModuleItem { | ||
3546 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3547 | std::fmt::Display::fmt(self.syntax(), f) | ||
3548 | } | ||
3549 | } | ||
3550 | impl AstNode for ModuleItem { | 2900 | impl AstNode for ModuleItem { |
3551 | fn can_cast(kind: SyntaxKind) -> bool { | 2901 | fn can_cast(kind: SyntaxKind) -> bool { |
3552 | match kind { | 2902 | match kind { |
@@ -3613,11 +2963,6 @@ impl From<TypeAliasDef> for ImplItem { | |||
3613 | impl From<ConstDef> for ImplItem { | 2963 | impl From<ConstDef> for ImplItem { |
3614 | fn from(node: ConstDef) -> ImplItem { ImplItem::ConstDef(node) } | 2964 | fn from(node: ConstDef) -> ImplItem { ImplItem::ConstDef(node) } |
3615 | } | 2965 | } |
3616 | impl std::fmt::Display for ImplItem { | ||
3617 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3618 | std::fmt::Display::fmt(self.syntax(), f) | ||
3619 | } | ||
3620 | } | ||
3621 | impl AstNode for ImplItem { | 2966 | impl AstNode for ImplItem { |
3622 | fn can_cast(kind: SyntaxKind) -> bool { | 2967 | fn can_cast(kind: SyntaxKind) -> bool { |
3623 | match kind { | 2968 | match kind { |
@@ -3655,11 +3000,6 @@ impl From<FnDef> for ExternItem { | |||
3655 | impl From<StaticDef> for ExternItem { | 3000 | impl From<StaticDef> for ExternItem { |
3656 | fn from(node: StaticDef) -> ExternItem { ExternItem::StaticDef(node) } | 3001 | fn from(node: StaticDef) -> ExternItem { ExternItem::StaticDef(node) } |
3657 | } | 3002 | } |
3658 | impl std::fmt::Display for ExternItem { | ||
3659 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3660 | std::fmt::Display::fmt(self.syntax(), f) | ||
3661 | } | ||
3662 | } | ||
3663 | impl AstNode for ExternItem { | 3003 | impl AstNode for ExternItem { |
3664 | fn can_cast(kind: SyntaxKind) -> bool { | 3004 | fn can_cast(kind: SyntaxKind) -> bool { |
3665 | match kind { | 3005 | match kind { |
@@ -3812,11 +3152,6 @@ impl From<MacroCall> for Expr { | |||
3812 | impl From<BoxExpr> for Expr { | 3152 | impl From<BoxExpr> for Expr { |
3813 | fn from(node: BoxExpr) -> Expr { Expr::BoxExpr(node) } | 3153 | fn from(node: BoxExpr) -> Expr { Expr::BoxExpr(node) } |
3814 | } | 3154 | } |
3815 | impl std::fmt::Display for Expr { | ||
3816 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3817 | std::fmt::Display::fmt(self.syntax(), f) | ||
3818 | } | ||
3819 | } | ||
3820 | impl AstNode for Expr { | 3155 | impl AstNode for Expr { |
3821 | fn can_cast(kind: SyntaxKind) -> bool { | 3156 | fn can_cast(kind: SyntaxKind) -> bool { |
3822 | match kind { | 3157 | match kind { |
@@ -3966,11 +3301,6 @@ impl From<LiteralPat> for Pat { | |||
3966 | impl From<MacroPat> for Pat { | 3301 | impl From<MacroPat> for Pat { |
3967 | fn from(node: MacroPat) -> Pat { Pat::MacroPat(node) } | 3302 | fn from(node: MacroPat) -> Pat { Pat::MacroPat(node) } |
3968 | } | 3303 | } |
3969 | impl std::fmt::Display for Pat { | ||
3970 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3971 | std::fmt::Display::fmt(self.syntax(), f) | ||
3972 | } | ||
3973 | } | ||
3974 | impl AstNode for Pat { | 3304 | impl AstNode for Pat { |
3975 | fn can_cast(kind: SyntaxKind) -> bool { | 3305 | fn can_cast(kind: SyntaxKind) -> bool { |
3976 | match kind { | 3306 | match kind { |
@@ -4032,11 +3362,6 @@ impl From<RecordFieldPat> for RecordInnerPat { | |||
4032 | impl From<BindPat> for RecordInnerPat { | 3362 | impl From<BindPat> for RecordInnerPat { |
4033 | fn from(node: BindPat) -> RecordInnerPat { RecordInnerPat::BindPat(node) } | 3363 | fn from(node: BindPat) -> RecordInnerPat { RecordInnerPat::BindPat(node) } |
4034 | } | 3364 | } |
4035 | impl std::fmt::Display for RecordInnerPat { | ||
4036 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4037 | std::fmt::Display::fmt(self.syntax(), f) | ||
4038 | } | ||
4039 | } | ||
4040 | impl AstNode for RecordInnerPat { | 3365 | impl AstNode for RecordInnerPat { |
4041 | fn can_cast(kind: SyntaxKind) -> bool { | 3366 | fn can_cast(kind: SyntaxKind) -> bool { |
4042 | match kind { | 3367 | match kind { |
@@ -4070,11 +3395,6 @@ impl From<Literal> for AttrInput { | |||
4070 | impl From<TokenTree> for AttrInput { | 3395 | impl From<TokenTree> for AttrInput { |
4071 | fn from(node: TokenTree) -> AttrInput { AttrInput::TokenTree(node) } | 3396 | fn from(node: TokenTree) -> AttrInput { AttrInput::TokenTree(node) } |
4072 | } | 3397 | } |
4073 | impl std::fmt::Display for AttrInput { | ||
4074 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4075 | std::fmt::Display::fmt(self.syntax(), f) | ||
4076 | } | ||
4077 | } | ||
4078 | impl AstNode for AttrInput { | 3398 | impl AstNode for AttrInput { |
4079 | fn can_cast(kind: SyntaxKind) -> bool { | 3399 | fn can_cast(kind: SyntaxKind) -> bool { |
4080 | match kind { | 3400 | match kind { |
@@ -4108,11 +3428,6 @@ impl From<LetStmt> for Stmt { | |||
4108 | impl From<ExprStmt> for Stmt { | 3428 | impl From<ExprStmt> for Stmt { |
4109 | fn from(node: ExprStmt) -> Stmt { Stmt::ExprStmt(node) } | 3429 | fn from(node: ExprStmt) -> Stmt { Stmt::ExprStmt(node) } |
4110 | } | 3430 | } |
4111 | impl std::fmt::Display for Stmt { | ||
4112 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4113 | std::fmt::Display::fmt(self.syntax(), f) | ||
4114 | } | ||
4115 | } | ||
4116 | impl AstNode for Stmt { | 3431 | impl AstNode for Stmt { |
4117 | fn can_cast(kind: SyntaxKind) -> bool { | 3432 | fn can_cast(kind: SyntaxKind) -> bool { |
4118 | match kind { | 3433 | match kind { |
@@ -4146,11 +3461,6 @@ impl From<RecordFieldDefList> for FieldDefList { | |||
4146 | impl From<TupleFieldDefList> for FieldDefList { | 3461 | impl From<TupleFieldDefList> for FieldDefList { |
4147 | fn from(node: TupleFieldDefList) -> FieldDefList { FieldDefList::TupleFieldDefList(node) } | 3462 | fn from(node: TupleFieldDefList) -> FieldDefList { FieldDefList::TupleFieldDefList(node) } |
4148 | } | 3463 | } |
4149 | impl std::fmt::Display for FieldDefList { | ||
4150 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4151 | std::fmt::Display::fmt(self.syntax(), f) | ||
4152 | } | ||
4153 | } | ||
4154 | impl AstNode for FieldDefList { | 3464 | impl AstNode for FieldDefList { |
4155 | fn can_cast(kind: SyntaxKind) -> bool { | 3465 | fn can_cast(kind: SyntaxKind) -> bool { |
4156 | match kind { | 3466 | match kind { |
@@ -4175,3 +3485,693 @@ impl AstNode for FieldDefList { | |||
4175 | } | 3485 | } |
4176 | } | 3486 | } |
4177 | } | 3487 | } |
3488 | impl std::fmt::Display for NominalDef { | ||
3489 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3490 | std::fmt::Display::fmt(self.syntax(), f) | ||
3491 | } | ||
3492 | } | ||
3493 | impl std::fmt::Display for GenericParam { | ||
3494 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3495 | std::fmt::Display::fmt(self.syntax(), f) | ||
3496 | } | ||
3497 | } | ||
3498 | impl std::fmt::Display for GenericArg { | ||
3499 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3500 | std::fmt::Display::fmt(self.syntax(), f) | ||
3501 | } | ||
3502 | } | ||
3503 | impl std::fmt::Display for TypeRef { | ||
3504 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3505 | std::fmt::Display::fmt(self.syntax(), f) | ||
3506 | } | ||
3507 | } | ||
3508 | impl std::fmt::Display for ModuleItem { | ||
3509 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3510 | std::fmt::Display::fmt(self.syntax(), f) | ||
3511 | } | ||
3512 | } | ||
3513 | impl std::fmt::Display for ImplItem { | ||
3514 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3515 | std::fmt::Display::fmt(self.syntax(), f) | ||
3516 | } | ||
3517 | } | ||
3518 | impl std::fmt::Display for ExternItem { | ||
3519 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3520 | std::fmt::Display::fmt(self.syntax(), f) | ||
3521 | } | ||
3522 | } | ||
3523 | impl std::fmt::Display for Expr { | ||
3524 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3525 | std::fmt::Display::fmt(self.syntax(), f) | ||
3526 | } | ||
3527 | } | ||
3528 | impl std::fmt::Display for Pat { | ||
3529 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3530 | std::fmt::Display::fmt(self.syntax(), f) | ||
3531 | } | ||
3532 | } | ||
3533 | impl std::fmt::Display for RecordInnerPat { | ||
3534 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3535 | std::fmt::Display::fmt(self.syntax(), f) | ||
3536 | } | ||
3537 | } | ||
3538 | impl std::fmt::Display for AttrInput { | ||
3539 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3540 | std::fmt::Display::fmt(self.syntax(), f) | ||
3541 | } | ||
3542 | } | ||
3543 | impl std::fmt::Display for Stmt { | ||
3544 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3545 | std::fmt::Display::fmt(self.syntax(), f) | ||
3546 | } | ||
3547 | } | ||
3548 | impl std::fmt::Display for FieldDefList { | ||
3549 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3550 | std::fmt::Display::fmt(self.syntax(), f) | ||
3551 | } | ||
3552 | } | ||
3553 | impl std::fmt::Display for SourceFile { | ||
3554 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3555 | std::fmt::Display::fmt(self.syntax(), f) | ||
3556 | } | ||
3557 | } | ||
3558 | impl std::fmt::Display for FnDef { | ||
3559 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3560 | std::fmt::Display::fmt(self.syntax(), f) | ||
3561 | } | ||
3562 | } | ||
3563 | impl std::fmt::Display for RetType { | ||
3564 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3565 | std::fmt::Display::fmt(self.syntax(), f) | ||
3566 | } | ||
3567 | } | ||
3568 | impl std::fmt::Display for StructDef { | ||
3569 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3570 | std::fmt::Display::fmt(self.syntax(), f) | ||
3571 | } | ||
3572 | } | ||
3573 | impl std::fmt::Display for UnionDef { | ||
3574 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3575 | std::fmt::Display::fmt(self.syntax(), f) | ||
3576 | } | ||
3577 | } | ||
3578 | impl std::fmt::Display for RecordFieldDefList { | ||
3579 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3580 | std::fmt::Display::fmt(self.syntax(), f) | ||
3581 | } | ||
3582 | } | ||
3583 | impl std::fmt::Display for RecordFieldDef { | ||
3584 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3585 | std::fmt::Display::fmt(self.syntax(), f) | ||
3586 | } | ||
3587 | } | ||
3588 | impl std::fmt::Display for TupleFieldDefList { | ||
3589 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3590 | std::fmt::Display::fmt(self.syntax(), f) | ||
3591 | } | ||
3592 | } | ||
3593 | impl std::fmt::Display for TupleFieldDef { | ||
3594 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3595 | std::fmt::Display::fmt(self.syntax(), f) | ||
3596 | } | ||
3597 | } | ||
3598 | impl std::fmt::Display for EnumDef { | ||
3599 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3600 | std::fmt::Display::fmt(self.syntax(), f) | ||
3601 | } | ||
3602 | } | ||
3603 | impl std::fmt::Display for EnumVariantList { | ||
3604 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3605 | std::fmt::Display::fmt(self.syntax(), f) | ||
3606 | } | ||
3607 | } | ||
3608 | impl std::fmt::Display for EnumVariant { | ||
3609 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3610 | std::fmt::Display::fmt(self.syntax(), f) | ||
3611 | } | ||
3612 | } | ||
3613 | impl std::fmt::Display for TraitDef { | ||
3614 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3615 | std::fmt::Display::fmt(self.syntax(), f) | ||
3616 | } | ||
3617 | } | ||
3618 | impl std::fmt::Display for Module { | ||
3619 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3620 | std::fmt::Display::fmt(self.syntax(), f) | ||
3621 | } | ||
3622 | } | ||
3623 | impl std::fmt::Display for ItemList { | ||
3624 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3625 | std::fmt::Display::fmt(self.syntax(), f) | ||
3626 | } | ||
3627 | } | ||
3628 | impl std::fmt::Display for ConstDef { | ||
3629 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3630 | std::fmt::Display::fmt(self.syntax(), f) | ||
3631 | } | ||
3632 | } | ||
3633 | impl std::fmt::Display for StaticDef { | ||
3634 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3635 | std::fmt::Display::fmt(self.syntax(), f) | ||
3636 | } | ||
3637 | } | ||
3638 | impl std::fmt::Display for TypeAliasDef { | ||
3639 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3640 | std::fmt::Display::fmt(self.syntax(), f) | ||
3641 | } | ||
3642 | } | ||
3643 | impl std::fmt::Display for ImplDef { | ||
3644 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3645 | std::fmt::Display::fmt(self.syntax(), f) | ||
3646 | } | ||
3647 | } | ||
3648 | impl std::fmt::Display for ParenType { | ||
3649 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3650 | std::fmt::Display::fmt(self.syntax(), f) | ||
3651 | } | ||
3652 | } | ||
3653 | impl std::fmt::Display for TupleType { | ||
3654 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3655 | std::fmt::Display::fmt(self.syntax(), f) | ||
3656 | } | ||
3657 | } | ||
3658 | impl std::fmt::Display for NeverType { | ||
3659 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3660 | std::fmt::Display::fmt(self.syntax(), f) | ||
3661 | } | ||
3662 | } | ||
3663 | impl std::fmt::Display for PathType { | ||
3664 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3665 | std::fmt::Display::fmt(self.syntax(), f) | ||
3666 | } | ||
3667 | } | ||
3668 | impl std::fmt::Display for PointerType { | ||
3669 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3670 | std::fmt::Display::fmt(self.syntax(), f) | ||
3671 | } | ||
3672 | } | ||
3673 | impl std::fmt::Display for ArrayType { | ||
3674 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3675 | std::fmt::Display::fmt(self.syntax(), f) | ||
3676 | } | ||
3677 | } | ||
3678 | impl std::fmt::Display for SliceType { | ||
3679 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3680 | std::fmt::Display::fmt(self.syntax(), f) | ||
3681 | } | ||
3682 | } | ||
3683 | impl std::fmt::Display for ReferenceType { | ||
3684 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3685 | std::fmt::Display::fmt(self.syntax(), f) | ||
3686 | } | ||
3687 | } | ||
3688 | impl std::fmt::Display for PlaceholderType { | ||
3689 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3690 | std::fmt::Display::fmt(self.syntax(), f) | ||
3691 | } | ||
3692 | } | ||
3693 | impl std::fmt::Display for FnPointerType { | ||
3694 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3695 | std::fmt::Display::fmt(self.syntax(), f) | ||
3696 | } | ||
3697 | } | ||
3698 | impl std::fmt::Display for ForType { | ||
3699 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3700 | std::fmt::Display::fmt(self.syntax(), f) | ||
3701 | } | ||
3702 | } | ||
3703 | impl std::fmt::Display for ImplTraitType { | ||
3704 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3705 | std::fmt::Display::fmt(self.syntax(), f) | ||
3706 | } | ||
3707 | } | ||
3708 | impl std::fmt::Display for DynTraitType { | ||
3709 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3710 | std::fmt::Display::fmt(self.syntax(), f) | ||
3711 | } | ||
3712 | } | ||
3713 | impl std::fmt::Display for TupleExpr { | ||
3714 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3715 | std::fmt::Display::fmt(self.syntax(), f) | ||
3716 | } | ||
3717 | } | ||
3718 | impl std::fmt::Display for ArrayExpr { | ||
3719 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3720 | std::fmt::Display::fmt(self.syntax(), f) | ||
3721 | } | ||
3722 | } | ||
3723 | impl std::fmt::Display for ParenExpr { | ||
3724 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3725 | std::fmt::Display::fmt(self.syntax(), f) | ||
3726 | } | ||
3727 | } | ||
3728 | impl std::fmt::Display for PathExpr { | ||
3729 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3730 | std::fmt::Display::fmt(self.syntax(), f) | ||
3731 | } | ||
3732 | } | ||
3733 | impl std::fmt::Display for LambdaExpr { | ||
3734 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3735 | std::fmt::Display::fmt(self.syntax(), f) | ||
3736 | } | ||
3737 | } | ||
3738 | impl std::fmt::Display for IfExpr { | ||
3739 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3740 | std::fmt::Display::fmt(self.syntax(), f) | ||
3741 | } | ||
3742 | } | ||
3743 | impl std::fmt::Display for LoopExpr { | ||
3744 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3745 | std::fmt::Display::fmt(self.syntax(), f) | ||
3746 | } | ||
3747 | } | ||
3748 | impl std::fmt::Display for TryBlockExpr { | ||
3749 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3750 | std::fmt::Display::fmt(self.syntax(), f) | ||
3751 | } | ||
3752 | } | ||
3753 | impl std::fmt::Display for ForExpr { | ||
3754 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3755 | std::fmt::Display::fmt(self.syntax(), f) | ||
3756 | } | ||
3757 | } | ||
3758 | impl std::fmt::Display for WhileExpr { | ||
3759 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3760 | std::fmt::Display::fmt(self.syntax(), f) | ||
3761 | } | ||
3762 | } | ||
3763 | impl std::fmt::Display for ContinueExpr { | ||
3764 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3765 | std::fmt::Display::fmt(self.syntax(), f) | ||
3766 | } | ||
3767 | } | ||
3768 | impl std::fmt::Display for BreakExpr { | ||
3769 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3770 | std::fmt::Display::fmt(self.syntax(), f) | ||
3771 | } | ||
3772 | } | ||
3773 | impl std::fmt::Display for Label { | ||
3774 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3775 | std::fmt::Display::fmt(self.syntax(), f) | ||
3776 | } | ||
3777 | } | ||
3778 | impl std::fmt::Display for BlockExpr { | ||
3779 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3780 | std::fmt::Display::fmt(self.syntax(), f) | ||
3781 | } | ||
3782 | } | ||
3783 | impl std::fmt::Display for ReturnExpr { | ||
3784 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3785 | std::fmt::Display::fmt(self.syntax(), f) | ||
3786 | } | ||
3787 | } | ||
3788 | impl std::fmt::Display for CallExpr { | ||
3789 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3790 | std::fmt::Display::fmt(self.syntax(), f) | ||
3791 | } | ||
3792 | } | ||
3793 | impl std::fmt::Display for MethodCallExpr { | ||
3794 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3795 | std::fmt::Display::fmt(self.syntax(), f) | ||
3796 | } | ||
3797 | } | ||
3798 | impl std::fmt::Display for IndexExpr { | ||
3799 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3800 | std::fmt::Display::fmt(self.syntax(), f) | ||
3801 | } | ||
3802 | } | ||
3803 | impl std::fmt::Display for FieldExpr { | ||
3804 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3805 | std::fmt::Display::fmt(self.syntax(), f) | ||
3806 | } | ||
3807 | } | ||
3808 | impl std::fmt::Display for AwaitExpr { | ||
3809 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3810 | std::fmt::Display::fmt(self.syntax(), f) | ||
3811 | } | ||
3812 | } | ||
3813 | impl std::fmt::Display for TryExpr { | ||
3814 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3815 | std::fmt::Display::fmt(self.syntax(), f) | ||
3816 | } | ||
3817 | } | ||
3818 | impl std::fmt::Display for CastExpr { | ||
3819 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3820 | std::fmt::Display::fmt(self.syntax(), f) | ||
3821 | } | ||
3822 | } | ||
3823 | impl std::fmt::Display for RefExpr { | ||
3824 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3825 | std::fmt::Display::fmt(self.syntax(), f) | ||
3826 | } | ||
3827 | } | ||
3828 | impl std::fmt::Display for PrefixExpr { | ||
3829 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3830 | std::fmt::Display::fmt(self.syntax(), f) | ||
3831 | } | ||
3832 | } | ||
3833 | impl std::fmt::Display for BoxExpr { | ||
3834 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3835 | std::fmt::Display::fmt(self.syntax(), f) | ||
3836 | } | ||
3837 | } | ||
3838 | impl std::fmt::Display for RangeExpr { | ||
3839 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3840 | std::fmt::Display::fmt(self.syntax(), f) | ||
3841 | } | ||
3842 | } | ||
3843 | impl std::fmt::Display for BinExpr { | ||
3844 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3845 | std::fmt::Display::fmt(self.syntax(), f) | ||
3846 | } | ||
3847 | } | ||
3848 | impl std::fmt::Display for Literal { | ||
3849 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3850 | std::fmt::Display::fmt(self.syntax(), f) | ||
3851 | } | ||
3852 | } | ||
3853 | impl std::fmt::Display for MatchExpr { | ||
3854 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3855 | std::fmt::Display::fmt(self.syntax(), f) | ||
3856 | } | ||
3857 | } | ||
3858 | impl std::fmt::Display for MatchArmList { | ||
3859 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3860 | std::fmt::Display::fmt(self.syntax(), f) | ||
3861 | } | ||
3862 | } | ||
3863 | impl std::fmt::Display for MatchArm { | ||
3864 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3865 | std::fmt::Display::fmt(self.syntax(), f) | ||
3866 | } | ||
3867 | } | ||
3868 | impl std::fmt::Display for MatchGuard { | ||
3869 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3870 | std::fmt::Display::fmt(self.syntax(), f) | ||
3871 | } | ||
3872 | } | ||
3873 | impl std::fmt::Display for RecordLit { | ||
3874 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3875 | std::fmt::Display::fmt(self.syntax(), f) | ||
3876 | } | ||
3877 | } | ||
3878 | impl std::fmt::Display for RecordFieldList { | ||
3879 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3880 | std::fmt::Display::fmt(self.syntax(), f) | ||
3881 | } | ||
3882 | } | ||
3883 | impl std::fmt::Display for RecordField { | ||
3884 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3885 | std::fmt::Display::fmt(self.syntax(), f) | ||
3886 | } | ||
3887 | } | ||
3888 | impl std::fmt::Display for OrPat { | ||
3889 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3890 | std::fmt::Display::fmt(self.syntax(), f) | ||
3891 | } | ||
3892 | } | ||
3893 | impl std::fmt::Display for ParenPat { | ||
3894 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3895 | std::fmt::Display::fmt(self.syntax(), f) | ||
3896 | } | ||
3897 | } | ||
3898 | impl std::fmt::Display for RefPat { | ||
3899 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3900 | std::fmt::Display::fmt(self.syntax(), f) | ||
3901 | } | ||
3902 | } | ||
3903 | impl std::fmt::Display for BoxPat { | ||
3904 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3905 | std::fmt::Display::fmt(self.syntax(), f) | ||
3906 | } | ||
3907 | } | ||
3908 | impl std::fmt::Display for BindPat { | ||
3909 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3910 | std::fmt::Display::fmt(self.syntax(), f) | ||
3911 | } | ||
3912 | } | ||
3913 | impl std::fmt::Display for PlaceholderPat { | ||
3914 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3915 | std::fmt::Display::fmt(self.syntax(), f) | ||
3916 | } | ||
3917 | } | ||
3918 | impl std::fmt::Display for DotDotPat { | ||
3919 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3920 | std::fmt::Display::fmt(self.syntax(), f) | ||
3921 | } | ||
3922 | } | ||
3923 | impl std::fmt::Display for PathPat { | ||
3924 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3925 | std::fmt::Display::fmt(self.syntax(), f) | ||
3926 | } | ||
3927 | } | ||
3928 | impl std::fmt::Display for SlicePat { | ||
3929 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3930 | std::fmt::Display::fmt(self.syntax(), f) | ||
3931 | } | ||
3932 | } | ||
3933 | impl std::fmt::Display for RangePat { | ||
3934 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3935 | std::fmt::Display::fmt(self.syntax(), f) | ||
3936 | } | ||
3937 | } | ||
3938 | impl std::fmt::Display for LiteralPat { | ||
3939 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3940 | std::fmt::Display::fmt(self.syntax(), f) | ||
3941 | } | ||
3942 | } | ||
3943 | impl std::fmt::Display for MacroPat { | ||
3944 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3945 | std::fmt::Display::fmt(self.syntax(), f) | ||
3946 | } | ||
3947 | } | ||
3948 | impl std::fmt::Display for RecordPat { | ||
3949 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3950 | std::fmt::Display::fmt(self.syntax(), f) | ||
3951 | } | ||
3952 | } | ||
3953 | impl std::fmt::Display for RecordFieldPatList { | ||
3954 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3955 | std::fmt::Display::fmt(self.syntax(), f) | ||
3956 | } | ||
3957 | } | ||
3958 | impl std::fmt::Display for RecordFieldPat { | ||
3959 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3960 | std::fmt::Display::fmt(self.syntax(), f) | ||
3961 | } | ||
3962 | } | ||
3963 | impl std::fmt::Display for TupleStructPat { | ||
3964 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3965 | std::fmt::Display::fmt(self.syntax(), f) | ||
3966 | } | ||
3967 | } | ||
3968 | impl std::fmt::Display for TuplePat { | ||
3969 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3970 | std::fmt::Display::fmt(self.syntax(), f) | ||
3971 | } | ||
3972 | } | ||
3973 | impl std::fmt::Display for Visibility { | ||
3974 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3975 | std::fmt::Display::fmt(self.syntax(), f) | ||
3976 | } | ||
3977 | } | ||
3978 | impl std::fmt::Display for Name { | ||
3979 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3980 | std::fmt::Display::fmt(self.syntax(), f) | ||
3981 | } | ||
3982 | } | ||
3983 | impl std::fmt::Display for NameRef { | ||
3984 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3985 | std::fmt::Display::fmt(self.syntax(), f) | ||
3986 | } | ||
3987 | } | ||
3988 | impl std::fmt::Display for MacroCall { | ||
3989 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3990 | std::fmt::Display::fmt(self.syntax(), f) | ||
3991 | } | ||
3992 | } | ||
3993 | impl std::fmt::Display for Attr { | ||
3994 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
3995 | std::fmt::Display::fmt(self.syntax(), f) | ||
3996 | } | ||
3997 | } | ||
3998 | impl std::fmt::Display for TokenTree { | ||
3999 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4000 | std::fmt::Display::fmt(self.syntax(), f) | ||
4001 | } | ||
4002 | } | ||
4003 | impl std::fmt::Display for TypeParamList { | ||
4004 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4005 | std::fmt::Display::fmt(self.syntax(), f) | ||
4006 | } | ||
4007 | } | ||
4008 | impl std::fmt::Display for TypeParam { | ||
4009 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4010 | std::fmt::Display::fmt(self.syntax(), f) | ||
4011 | } | ||
4012 | } | ||
4013 | impl std::fmt::Display for ConstParam { | ||
4014 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4015 | std::fmt::Display::fmt(self.syntax(), f) | ||
4016 | } | ||
4017 | } | ||
4018 | impl std::fmt::Display for LifetimeParam { | ||
4019 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4020 | std::fmt::Display::fmt(self.syntax(), f) | ||
4021 | } | ||
4022 | } | ||
4023 | impl std::fmt::Display for TypeBound { | ||
4024 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4025 | std::fmt::Display::fmt(self.syntax(), f) | ||
4026 | } | ||
4027 | } | ||
4028 | impl std::fmt::Display for TypeBoundList { | ||
4029 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4030 | std::fmt::Display::fmt(self.syntax(), f) | ||
4031 | } | ||
4032 | } | ||
4033 | impl std::fmt::Display for WherePred { | ||
4034 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4035 | std::fmt::Display::fmt(self.syntax(), f) | ||
4036 | } | ||
4037 | } | ||
4038 | impl std::fmt::Display for WhereClause { | ||
4039 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4040 | std::fmt::Display::fmt(self.syntax(), f) | ||
4041 | } | ||
4042 | } | ||
4043 | impl std::fmt::Display for Abi { | ||
4044 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4045 | std::fmt::Display::fmt(self.syntax(), f) | ||
4046 | } | ||
4047 | } | ||
4048 | impl std::fmt::Display for ExprStmt { | ||
4049 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4050 | std::fmt::Display::fmt(self.syntax(), f) | ||
4051 | } | ||
4052 | } | ||
4053 | impl std::fmt::Display for LetStmt { | ||
4054 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4055 | std::fmt::Display::fmt(self.syntax(), f) | ||
4056 | } | ||
4057 | } | ||
4058 | impl std::fmt::Display for Condition { | ||
4059 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4060 | std::fmt::Display::fmt(self.syntax(), f) | ||
4061 | } | ||
4062 | } | ||
4063 | impl std::fmt::Display for Block { | ||
4064 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4065 | std::fmt::Display::fmt(self.syntax(), f) | ||
4066 | } | ||
4067 | } | ||
4068 | impl std::fmt::Display for ParamList { | ||
4069 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4070 | std::fmt::Display::fmt(self.syntax(), f) | ||
4071 | } | ||
4072 | } | ||
4073 | impl std::fmt::Display for SelfParam { | ||
4074 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4075 | std::fmt::Display::fmt(self.syntax(), f) | ||
4076 | } | ||
4077 | } | ||
4078 | impl std::fmt::Display for Param { | ||
4079 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4080 | std::fmt::Display::fmt(self.syntax(), f) | ||
4081 | } | ||
4082 | } | ||
4083 | impl std::fmt::Display for UseItem { | ||
4084 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4085 | std::fmt::Display::fmt(self.syntax(), f) | ||
4086 | } | ||
4087 | } | ||
4088 | impl std::fmt::Display for UseTree { | ||
4089 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4090 | std::fmt::Display::fmt(self.syntax(), f) | ||
4091 | } | ||
4092 | } | ||
4093 | impl std::fmt::Display for Alias { | ||
4094 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4095 | std::fmt::Display::fmt(self.syntax(), f) | ||
4096 | } | ||
4097 | } | ||
4098 | impl std::fmt::Display for UseTreeList { | ||
4099 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4100 | std::fmt::Display::fmt(self.syntax(), f) | ||
4101 | } | ||
4102 | } | ||
4103 | impl std::fmt::Display for ExternCrateItem { | ||
4104 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4105 | std::fmt::Display::fmt(self.syntax(), f) | ||
4106 | } | ||
4107 | } | ||
4108 | impl std::fmt::Display for ArgList { | ||
4109 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4110 | std::fmt::Display::fmt(self.syntax(), f) | ||
4111 | } | ||
4112 | } | ||
4113 | impl std::fmt::Display for Path { | ||
4114 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4115 | std::fmt::Display::fmt(self.syntax(), f) | ||
4116 | } | ||
4117 | } | ||
4118 | impl std::fmt::Display for PathSegment { | ||
4119 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4120 | std::fmt::Display::fmt(self.syntax(), f) | ||
4121 | } | ||
4122 | } | ||
4123 | impl std::fmt::Display for TypeArgList { | ||
4124 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4125 | std::fmt::Display::fmt(self.syntax(), f) | ||
4126 | } | ||
4127 | } | ||
4128 | impl std::fmt::Display for TypeArg { | ||
4129 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4130 | std::fmt::Display::fmt(self.syntax(), f) | ||
4131 | } | ||
4132 | } | ||
4133 | impl std::fmt::Display for AssocTypeArg { | ||
4134 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4135 | std::fmt::Display::fmt(self.syntax(), f) | ||
4136 | } | ||
4137 | } | ||
4138 | impl std::fmt::Display for LifetimeArg { | ||
4139 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4140 | std::fmt::Display::fmt(self.syntax(), f) | ||
4141 | } | ||
4142 | } | ||
4143 | impl std::fmt::Display for ConstArg { | ||
4144 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4145 | std::fmt::Display::fmt(self.syntax(), f) | ||
4146 | } | ||
4147 | } | ||
4148 | impl std::fmt::Display for MacroItems { | ||
4149 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4150 | std::fmt::Display::fmt(self.syntax(), f) | ||
4151 | } | ||
4152 | } | ||
4153 | impl std::fmt::Display for MacroStmts { | ||
4154 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4155 | std::fmt::Display::fmt(self.syntax(), f) | ||
4156 | } | ||
4157 | } | ||
4158 | impl std::fmt::Display for ExternItemList { | ||
4159 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4160 | std::fmt::Display::fmt(self.syntax(), f) | ||
4161 | } | ||
4162 | } | ||
4163 | impl std::fmt::Display for ExternBlock { | ||
4164 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4165 | std::fmt::Display::fmt(self.syntax(), f) | ||
4166 | } | ||
4167 | } | ||
4168 | impl std::fmt::Display for MetaItem { | ||
4169 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4170 | std::fmt::Display::fmt(self.syntax(), f) | ||
4171 | } | ||
4172 | } | ||
4173 | impl std::fmt::Display for MacroDef { | ||
4174 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
4175 | std::fmt::Display::fmt(self.syntax(), f) | ||
4176 | } | ||
4177 | } | ||