aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast/generated/nodes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/ast/generated/nodes.rs')
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs2240
1 files changed, 560 insertions, 1680 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index 18bf30657..6e258250c 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -29,17 +29,13 @@ impl AstNode for SourceFile {
29 None 29 None
30 } 30 }
31 } 31 }
32 fn syntax(&self) -> &SyntaxNode { 32 fn syntax(&self) -> &SyntaxNode { &self.syntax }
33 &self.syntax
34 }
35} 33}
36impl ast::ModuleItemOwner for SourceFile {} 34impl ast::ModuleItemOwner for SourceFile {}
37impl ast::FnDefOwner for SourceFile {} 35impl ast::FnDefOwner for SourceFile {}
38impl ast::AttrsOwner for SourceFile {} 36impl ast::AttrsOwner for SourceFile {}
39impl SourceFile { 37impl SourceFile {
40 pub fn modules(&self) -> AstChildren<Module> { 38 pub fn modules(&self) -> AstChildren<Module> { support::children(&self.syntax) }
41 support::children(&self.syntax)
42 }
43} 39}
44#[derive(Debug, Clone, PartialEq, Eq, Hash)] 40#[derive(Debug, Clone, PartialEq, Eq, Hash)]
45pub struct FnDef { 41pub struct FnDef {
@@ -64,9 +60,7 @@ impl AstNode for FnDef {
64 None 60 None
65 } 61 }
66 } 62 }
67 fn syntax(&self) -> &SyntaxNode { 63 fn syntax(&self) -> &SyntaxNode { &self.syntax }
68 &self.syntax
69 }
70} 64}
71impl ast::VisibilityOwner for FnDef {} 65impl ast::VisibilityOwner for FnDef {}
72impl ast::NameOwner for FnDef {} 66impl ast::NameOwner for FnDef {}
@@ -74,36 +68,16 @@ impl ast::TypeParamsOwner for FnDef {}
74impl ast::DocCommentsOwner for FnDef {} 68impl ast::DocCommentsOwner for FnDef {}
75impl ast::AttrsOwner for FnDef {} 69impl ast::AttrsOwner for FnDef {}
76impl FnDef { 70impl FnDef {
77 pub fn abi(&self) -> Option<Abi> { 71 pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
78 support::child(&self.syntax) 72 pub fn const_kw(&self) -> Option<ConstKw> { support::token(&self.syntax) }
79 } 73 pub fn default_kw(&self) -> Option<DefaultKw> { support::token(&self.syntax) }
80 pub fn const_kw(&self) -> Option<ConstKw> { 74 pub fn async_kw(&self) -> Option<AsyncKw> { support::token(&self.syntax) }
81 support::token(&self.syntax) 75 pub fn unsafe_kw(&self) -> Option<UnsafeKw> { support::token(&self.syntax) }
82 } 76 pub fn fn_kw(&self) -> Option<FnKw> { support::token(&self.syntax) }
83 pub fn default_kw(&self) -> Option<DefaultKw> { 77 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
84 support::token(&self.syntax) 78 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
85 } 79 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
86 pub fn async_kw(&self) -> Option<AsyncKw> { 80 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) }
87 support::token(&self.syntax)
88 }
89 pub fn unsafe_kw(&self) -> Option<UnsafeKw> {
90 support::token(&self.syntax)
91 }
92 pub fn fn_kw(&self) -> Option<FnKw> {
93 support::token(&self.syntax)
94 }
95 pub fn param_list(&self) -> Option<ParamList> {
96 support::child(&self.syntax)
97 }
98 pub fn ret_type(&self) -> Option<RetType> {
99 support::child(&self.syntax)
100 }
101 pub fn body(&self) -> Option<BlockExpr> {
102 support::child(&self.syntax)
103 }
104 pub fn semi(&self) -> Option<Semi> {
105 support::token(&self.syntax)
106 }
107} 81}
108#[derive(Debug, Clone, PartialEq, Eq, Hash)] 82#[derive(Debug, Clone, PartialEq, Eq, Hash)]
109pub struct RetType { 83pub struct RetType {
@@ -128,17 +102,11 @@ impl AstNode for RetType {
128 None 102 None
129 } 103 }
130 } 104 }
131 fn syntax(&self) -> &SyntaxNode { 105 fn syntax(&self) -> &SyntaxNode { &self.syntax }
132 &self.syntax
133 }
134} 106}
135impl RetType { 107impl RetType {
136 pub fn thin_arrow(&self) -> Option<ThinArrow> { 108 pub fn thin_arrow(&self) -> Option<ThinArrow> { support::token(&self.syntax) }
137 support::token(&self.syntax) 109 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
138 }
139 pub fn type_ref(&self) -> Option<TypeRef> {
140 support::child(&self.syntax)
141 }
142} 110}
143#[derive(Debug, Clone, PartialEq, Eq, Hash)] 111#[derive(Debug, Clone, PartialEq, Eq, Hash)]
144pub struct StructDef { 112pub struct StructDef {
@@ -163,9 +131,7 @@ impl AstNode for StructDef {
163 None 131 None
164 } 132 }
165 } 133 }
166 fn syntax(&self) -> &SyntaxNode { 134 fn syntax(&self) -> &SyntaxNode { &self.syntax }
167 &self.syntax
168 }
169} 135}
170impl ast::VisibilityOwner for StructDef {} 136impl ast::VisibilityOwner for StructDef {}
171impl ast::NameOwner for StructDef {} 137impl ast::NameOwner for StructDef {}
@@ -173,15 +139,9 @@ impl ast::TypeParamsOwner for StructDef {}
173impl ast::AttrsOwner for StructDef {} 139impl ast::AttrsOwner for StructDef {}
174impl ast::DocCommentsOwner for StructDef {} 140impl ast::DocCommentsOwner for StructDef {}
175impl StructDef { 141impl StructDef {
176 pub fn struct_kw(&self) -> Option<StructKw> { 142 pub fn struct_kw(&self) -> Option<StructKw> { support::token(&self.syntax) }
177 support::token(&self.syntax) 143 pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) }
178 } 144 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) }
179 pub fn field_def_list(&self) -> Option<FieldDefList> {
180 support::child(&self.syntax)
181 }
182 pub fn semi(&self) -> Option<Semi> {
183 support::token(&self.syntax)
184 }
185} 145}
186#[derive(Debug, Clone, PartialEq, Eq, Hash)] 146#[derive(Debug, Clone, PartialEq, Eq, Hash)]
187pub struct UnionDef { 147pub struct UnionDef {
@@ -206,9 +166,7 @@ impl AstNode for UnionDef {
206 None 166 None
207 } 167 }
208 } 168 }
209 fn syntax(&self) -> &SyntaxNode { 169 fn syntax(&self) -> &SyntaxNode { &self.syntax }
210 &self.syntax
211 }
212} 170}
213impl ast::VisibilityOwner for UnionDef {} 171impl ast::VisibilityOwner for UnionDef {}
214impl ast::NameOwner for UnionDef {} 172impl ast::NameOwner for UnionDef {}
@@ -216,9 +174,7 @@ impl ast::TypeParamsOwner for UnionDef {}
216impl ast::AttrsOwner for UnionDef {} 174impl ast::AttrsOwner for UnionDef {}
217impl ast::DocCommentsOwner for UnionDef {} 175impl ast::DocCommentsOwner for UnionDef {}
218impl UnionDef { 176impl UnionDef {
219 pub fn union_kw(&self) -> Option<UnionKw> { 177 pub fn union_kw(&self) -> Option<UnionKw> { support::token(&self.syntax) }
220 support::token(&self.syntax)
221 }
222 pub fn record_field_def_list(&self) -> Option<RecordFieldDefList> { 178 pub fn record_field_def_list(&self) -> Option<RecordFieldDefList> {
223 support::child(&self.syntax) 179 support::child(&self.syntax)
224 } 180 }
@@ -246,20 +202,12 @@ impl AstNode for RecordFieldDefList {
246 None 202 None
247 } 203 }
248 } 204 }
249 fn syntax(&self) -> &SyntaxNode { 205 fn syntax(&self) -> &SyntaxNode { &self.syntax }
250 &self.syntax
251 }
252} 206}
253impl RecordFieldDefList { 207impl RecordFieldDefList {
254 pub fn l_curly(&self) -> Option<LCurly> { 208 pub fn l_curly(&self) -> Option<LCurly> { support::token(&self.syntax) }
255 support::token(&self.syntax) 209 pub fn fields(&self) -> AstChildren<RecordFieldDef> { support::children(&self.syntax) }
256 } 210 pub fn r_curly(&self) -> Option<RCurly> { support::token(&self.syntax) }
257 pub fn fields(&self) -> AstChildren<RecordFieldDef> {
258 support::children(&self.syntax)
259 }
260 pub fn r_curly(&self) -> Option<RCurly> {
261 support::token(&self.syntax)
262 }
263} 211}
264#[derive(Debug, Clone, PartialEq, Eq, Hash)] 212#[derive(Debug, Clone, PartialEq, Eq, Hash)]
265pub struct RecordFieldDef { 213pub struct RecordFieldDef {
@@ -284,9 +232,7 @@ impl AstNode for RecordFieldDef {
284 None 232 None
285 } 233 }
286 } 234 }
287 fn syntax(&self) -> &SyntaxNode { 235 fn syntax(&self) -> &SyntaxNode { &self.syntax }
288 &self.syntax
289 }
290} 236}
291impl ast::VisibilityOwner for RecordFieldDef {} 237impl ast::VisibilityOwner for RecordFieldDef {}
292impl ast::NameOwner for RecordFieldDef {} 238impl ast::NameOwner for RecordFieldDef {}
@@ -317,20 +263,12 @@ impl AstNode for TupleFieldDefList {
317 None 263 None
318 } 264 }
319 } 265 }
320 fn syntax(&self) -> &SyntaxNode { 266 fn syntax(&self) -> &SyntaxNode { &self.syntax }
321 &self.syntax
322 }
323} 267}
324impl TupleFieldDefList { 268impl TupleFieldDefList {
325 pub fn l_paren(&self) -> Option<LParen> { 269 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) }
326 support::token(&self.syntax) 270 pub fn fields(&self) -> AstChildren<TupleFieldDef> { support::children(&self.syntax) }
327 } 271 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) }
328 pub fn fields(&self) -> AstChildren<TupleFieldDef> {
329 support::children(&self.syntax)
330 }
331 pub fn r_paren(&self) -> Option<RParen> {
332 support::token(&self.syntax)
333 }
334} 272}
335#[derive(Debug, Clone, PartialEq, Eq, Hash)] 273#[derive(Debug, Clone, PartialEq, Eq, Hash)]
336pub struct TupleFieldDef { 274pub struct TupleFieldDef {
@@ -355,16 +293,12 @@ impl AstNode for TupleFieldDef {
355 None 293 None
356 } 294 }
357 } 295 }
358 fn syntax(&self) -> &SyntaxNode { 296 fn syntax(&self) -> &SyntaxNode { &self.syntax }
359 &self.syntax
360 }
361} 297}
362impl ast::VisibilityOwner for TupleFieldDef {} 298impl ast::VisibilityOwner for TupleFieldDef {}
363impl ast::AttrsOwner for TupleFieldDef {} 299impl ast::AttrsOwner for TupleFieldDef {}
364impl TupleFieldDef { 300impl TupleFieldDef {
365 pub fn type_ref(&self) -> Option<TypeRef> { 301 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
366 support::child(&self.syntax)
367 }
368} 302}
369#[derive(Debug, Clone, PartialEq, Eq, Hash)] 303#[derive(Debug, Clone, PartialEq, Eq, Hash)]
370pub struct EnumDef { 304pub struct EnumDef {
@@ -389,9 +323,7 @@ impl AstNode for EnumDef {
389 None 323 None
390 } 324 }
391 } 325 }
392 fn syntax(&self) -> &SyntaxNode { 326 fn syntax(&self) -> &SyntaxNode { &self.syntax }
393 &self.syntax
394 }
395} 327}
396impl ast::VisibilityOwner for EnumDef {} 328impl ast::VisibilityOwner for EnumDef {}
397impl ast::NameOwner for EnumDef {} 329impl ast::NameOwner for EnumDef {}
@@ -399,12 +331,8 @@ impl ast::TypeParamsOwner for EnumDef {}
399impl ast::AttrsOwner for EnumDef {} 331impl ast::AttrsOwner for EnumDef {}
400impl ast::DocCommentsOwner for EnumDef {} 332impl ast::DocCommentsOwner for EnumDef {}
401impl EnumDef { 333impl EnumDef {
402 pub fn enum_kw(&self) -> Option<EnumKw> { 334 pub fn enum_kw(&self) -> Option<EnumKw> { support::token(&self.syntax) }
403 support::token(&self.syntax) 335 pub fn variant_list(&self) -> Option<EnumVariantList> { support::child(&self.syntax) }
404 }
405 pub fn variant_list(&self) -> Option<EnumVariantList> {
406 support::child(&self.syntax)
407 }
408} 336}
409#[derive(Debug, Clone, PartialEq, Eq, Hash)] 337#[derive(Debug, Clone, PartialEq, Eq, Hash)]
410pub struct EnumVariantList { 338pub struct EnumVariantList {
@@ -429,20 +357,12 @@ impl AstNode for EnumVariantList {
429 None 357 None
430 } 358 }
431 } 359 }
432 fn syntax(&self) -> &SyntaxNode { 360 fn syntax(&self) -> &SyntaxNode { &self.syntax }
433 &self.syntax
434 }
435} 361}
436impl EnumVariantList { 362impl EnumVariantList {
437 pub fn l_curly(&self) -> Option<LCurly> { 363 pub fn l_curly(&self) -> Option<LCurly> { support::token(&self.syntax) }
438 support::token(&self.syntax) 364 pub fn variants(&self) -> AstChildren<EnumVariant> { support::children(&self.syntax) }
439 } 365 pub fn r_curly(&self) -> Option<RCurly> { support::token(&self.syntax) }
440 pub fn variants(&self) -> AstChildren<EnumVariant> {
441 support::children(&self.syntax)
442 }
443 pub fn r_curly(&self) -> Option<RCurly> {
444 support::token(&self.syntax)
445 }
446} 366}
447#[derive(Debug, Clone, PartialEq, Eq, Hash)] 367#[derive(Debug, Clone, PartialEq, Eq, Hash)]
448pub struct EnumVariant { 368pub struct EnumVariant {
@@ -467,24 +387,16 @@ impl AstNode for EnumVariant {
467 None 387 None
468 } 388 }
469 } 389 }
470 fn syntax(&self) -> &SyntaxNode { 390 fn syntax(&self) -> &SyntaxNode { &self.syntax }
471 &self.syntax
472 }
473} 391}
474impl ast::VisibilityOwner for EnumVariant {} 392impl ast::VisibilityOwner for EnumVariant {}
475impl ast::NameOwner for EnumVariant {} 393impl ast::NameOwner for EnumVariant {}
476impl ast::DocCommentsOwner for EnumVariant {} 394impl ast::DocCommentsOwner for EnumVariant {}
477impl ast::AttrsOwner for EnumVariant {} 395impl ast::AttrsOwner for EnumVariant {}
478impl EnumVariant { 396impl EnumVariant {
479 pub fn field_def_list(&self) -> Option<FieldDefList> { 397 pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) }
480 support::child(&self.syntax) 398 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) }
481 } 399 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
482 pub fn eq(&self) -> Option<Eq> {
483 support::token(&self.syntax)
484 }
485 pub fn expr(&self) -> Option<Expr> {
486 support::child(&self.syntax)
487 }
488} 400}
489#[derive(Debug, Clone, PartialEq, Eq, Hash)] 401#[derive(Debug, Clone, PartialEq, Eq, Hash)]
490pub struct TraitDef { 402pub struct TraitDef {
@@ -509,9 +421,7 @@ impl AstNode for TraitDef {
509 None 421 None
510 } 422 }
511 } 423 }
512 fn syntax(&self) -> &SyntaxNode { 424 fn syntax(&self) -> &SyntaxNode { &self.syntax }
513 &self.syntax
514 }
515} 425}
516impl ast::VisibilityOwner for TraitDef {} 426impl ast::VisibilityOwner for TraitDef {}
517impl ast::NameOwner for TraitDef {} 427impl ast::NameOwner for TraitDef {}
@@ -520,18 +430,10 @@ impl ast::DocCommentsOwner for TraitDef {}
520impl ast::TypeParamsOwner for TraitDef {} 430impl ast::TypeParamsOwner for TraitDef {}
521impl ast::TypeBoundsOwner for TraitDef {} 431impl ast::TypeBoundsOwner for TraitDef {}
522impl TraitDef { 432impl TraitDef {
523 pub fn unsafe_kw(&self) -> Option<UnsafeKw> { 433 pub fn unsafe_kw(&self) -> Option<UnsafeKw> { support::token(&self.syntax) }
524 support::token(&self.syntax) 434 pub fn auto_kw(&self) -> Option<AutoKw> { support::token(&self.syntax) }
525 } 435 pub fn trait_kw(&self) -> Option<TraitKw> { support::token(&self.syntax) }
526 pub fn auto_kw(&self) -> Option<AutoKw> { 436 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) }
527 support::token(&self.syntax)
528 }
529 pub fn trait_kw(&self) -> Option<TraitKw> {
530 support::token(&self.syntax)
531 }
532 pub fn item_list(&self) -> Option<ItemList> {
533 support::child(&self.syntax)
534 }
535} 437}
536#[derive(Debug, Clone, PartialEq, Eq, Hash)] 438#[derive(Debug, Clone, PartialEq, Eq, Hash)]
537pub struct Module { 439pub struct Module {
@@ -556,24 +458,16 @@ impl AstNode for Module {
556 None 458 None
557 } 459 }
558 } 460 }
559 fn syntax(&self) -> &SyntaxNode { 461 fn syntax(&self) -> &SyntaxNode { &self.syntax }
560 &self.syntax
561 }
562} 462}
563impl ast::VisibilityOwner for Module {} 463impl ast::VisibilityOwner for Module {}
564impl ast::NameOwner for Module {} 464impl ast::NameOwner for Module {}
565impl ast::AttrsOwner for Module {} 465impl ast::AttrsOwner for Module {}
566impl ast::DocCommentsOwner for Module {} 466impl ast::DocCommentsOwner for Module {}
567impl Module { 467impl Module {
568 pub fn mod_kw(&self) -> Option<ModKw> { 468 pub fn mod_kw(&self) -> Option<ModKw> { support::token(&self.syntax) }
569 support::token(&self.syntax) 469 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) }
570 } 470 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) }
571 pub fn item_list(&self) -> Option<ItemList> {
572 support::child(&self.syntax)
573 }
574 pub fn semi(&self) -> Option<Semi> {
575 support::token(&self.syntax)
576 }
577} 471}
578#[derive(Debug, Clone, PartialEq, Eq, Hash)] 472#[derive(Debug, Clone, PartialEq, Eq, Hash)]
579pub struct ItemList { 473pub struct ItemList {
@@ -598,22 +492,14 @@ impl AstNode for ItemList {
598 None 492 None
599 } 493 }
600 } 494 }
601 fn syntax(&self) -> &SyntaxNode { 495 fn syntax(&self) -> &SyntaxNode { &self.syntax }
602 &self.syntax
603 }
604} 496}
605impl ast::FnDefOwner for ItemList {} 497impl ast::FnDefOwner for ItemList {}
606impl ast::ModuleItemOwner for ItemList {} 498impl ast::ModuleItemOwner for ItemList {}
607impl ItemList { 499impl ItemList {
608 pub fn l_curly(&self) -> Option<LCurly> { 500 pub fn l_curly(&self) -> Option<LCurly> { support::token(&self.syntax) }
609 support::token(&self.syntax) 501 pub fn impl_items(&self) -> AstChildren<ImplItem> { support::children(&self.syntax) }
610 } 502 pub fn r_curly(&self) -> Option<RCurly> { support::token(&self.syntax) }
611 pub fn impl_items(&self) -> AstChildren<ImplItem> {
612 support::children(&self.syntax)
613 }
614 pub fn r_curly(&self) -> Option<RCurly> {
615 support::token(&self.syntax)
616 }
617} 503}
618#[derive(Debug, Clone, PartialEq, Eq, Hash)] 504#[derive(Debug, Clone, PartialEq, Eq, Hash)]
619pub struct ConstDef { 505pub struct ConstDef {
@@ -638,9 +524,7 @@ impl AstNode for ConstDef {
638 None 524 None
639 } 525 }
640 } 526 }
641 fn syntax(&self) -> &SyntaxNode { 527 fn syntax(&self) -> &SyntaxNode { &self.syntax }
642 &self.syntax
643 }
644} 528}
645impl ast::VisibilityOwner for ConstDef {} 529impl ast::VisibilityOwner for ConstDef {}
646impl ast::NameOwner for ConstDef {} 530impl ast::NameOwner for ConstDef {}
@@ -649,21 +533,11 @@ impl ast::AttrsOwner for ConstDef {}
649impl ast::DocCommentsOwner for ConstDef {} 533impl ast::DocCommentsOwner for ConstDef {}
650impl ast::TypeAscriptionOwner for ConstDef {} 534impl ast::TypeAscriptionOwner for ConstDef {}
651impl ConstDef { 535impl ConstDef {
652 pub fn default_kw(&self) -> Option<DefaultKw> { 536 pub fn default_kw(&self) -> Option<DefaultKw> { support::token(&self.syntax) }
653 support::token(&self.syntax) 537 pub fn const_kw(&self) -> Option<ConstKw> { support::token(&self.syntax) }
654 } 538 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) }
655 pub fn const_kw(&self) -> Option<ConstKw> { 539 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
656 support::token(&self.syntax) 540 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) }
657 }
658 pub fn eq(&self) -> Option<Eq> {
659 support::token(&self.syntax)
660 }
661 pub fn body(&self) -> Option<Expr> {
662 support::child(&self.syntax)
663 }
664 pub fn semi(&self) -> Option<Semi> {
665 support::token(&self.syntax)
666 }
667} 541}
668#[derive(Debug, Clone, PartialEq, Eq, Hash)] 542#[derive(Debug, Clone, PartialEq, Eq, Hash)]
669pub struct StaticDef { 543pub struct StaticDef {
@@ -688,9 +562,7 @@ impl AstNode for StaticDef {
688 None 562 None
689 } 563 }
690 } 564 }
691 fn syntax(&self) -> &SyntaxNode { 565 fn syntax(&self) -> &SyntaxNode { &self.syntax }
692 &self.syntax
693 }
694} 566}
695impl ast::VisibilityOwner for StaticDef {} 567impl ast::VisibilityOwner for StaticDef {}
696impl ast::NameOwner for StaticDef {} 568impl ast::NameOwner for StaticDef {}
@@ -699,21 +571,11 @@ impl ast::AttrsOwner for StaticDef {}
699impl ast::DocCommentsOwner for StaticDef {} 571impl ast::DocCommentsOwner for StaticDef {}
700impl ast::TypeAscriptionOwner for StaticDef {} 572impl ast::TypeAscriptionOwner for StaticDef {}
701impl StaticDef { 573impl StaticDef {
702 pub fn static_kw(&self) -> Option<StaticKw> { 574 pub fn static_kw(&self) -> Option<StaticKw> { support::token(&self.syntax) }
703 support::token(&self.syntax) 575 pub fn mut_kw(&self) -> Option<MutKw> { support::token(&self.syntax) }
704 } 576 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) }
705 pub fn mut_kw(&self) -> Option<MutKw> { 577 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
706 support::token(&self.syntax) 578 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) }
707 }
708 pub fn eq(&self) -> Option<Eq> {
709 support::token(&self.syntax)
710 }
711 pub fn body(&self) -> Option<Expr> {
712 support::child(&self.syntax)
713 }
714 pub fn semi(&self) -> Option<Semi> {
715 support::token(&self.syntax)
716 }
717} 579}
718#[derive(Debug, Clone, PartialEq, Eq, Hash)] 580#[derive(Debug, Clone, PartialEq, Eq, Hash)]
719pub struct TypeAliasDef { 581pub struct TypeAliasDef {
@@ -738,9 +600,7 @@ impl AstNode for TypeAliasDef {
738 None 600 None
739 } 601 }
740 } 602 }
741 fn syntax(&self) -> &SyntaxNode { 603 fn syntax(&self) -> &SyntaxNode { &self.syntax }
742 &self.syntax
743 }
744} 604}
745impl ast::VisibilityOwner for TypeAliasDef {} 605impl ast::VisibilityOwner for TypeAliasDef {}
746impl ast::NameOwner for TypeAliasDef {} 606impl ast::NameOwner for TypeAliasDef {}
@@ -749,21 +609,11 @@ impl ast::AttrsOwner for TypeAliasDef {}
749impl ast::DocCommentsOwner for TypeAliasDef {} 609impl ast::DocCommentsOwner for TypeAliasDef {}
750impl ast::TypeBoundsOwner for TypeAliasDef {} 610impl ast::TypeBoundsOwner for TypeAliasDef {}
751impl TypeAliasDef { 611impl TypeAliasDef {
752 pub fn default_kw(&self) -> Option<DefaultKw> { 612 pub fn default_kw(&self) -> Option<DefaultKw> { support::token(&self.syntax) }
753 support::token(&self.syntax) 613 pub fn type_kw(&self) -> Option<TypeKw> { support::token(&self.syntax) }
754 } 614 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) }
755 pub fn type_kw(&self) -> Option<TypeKw> { 615 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
756 support::token(&self.syntax) 616 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) }
757 }
758 pub fn eq(&self) -> Option<Eq> {
759 support::token(&self.syntax)
760 }
761 pub fn type_ref(&self) -> Option<TypeRef> {
762 support::child(&self.syntax)
763 }
764 pub fn semi(&self) -> Option<Semi> {
765 support::token(&self.syntax)
766 }
767} 617}
768#[derive(Debug, Clone, PartialEq, Eq, Hash)] 618#[derive(Debug, Clone, PartialEq, Eq, Hash)]
769pub struct ImplDef { 619pub struct ImplDef {
@@ -788,34 +638,18 @@ impl AstNode for ImplDef {
788 None 638 None
789 } 639 }
790 } 640 }
791 fn syntax(&self) -> &SyntaxNode { 641 fn syntax(&self) -> &SyntaxNode { &self.syntax }
792 &self.syntax
793 }
794} 642}
795impl ast::TypeParamsOwner for ImplDef {} 643impl ast::TypeParamsOwner for ImplDef {}
796impl ast::AttrsOwner for ImplDef {} 644impl ast::AttrsOwner for ImplDef {}
797impl ImplDef { 645impl ImplDef {
798 pub fn default_kw(&self) -> Option<DefaultKw> { 646 pub fn default_kw(&self) -> Option<DefaultKw> { support::token(&self.syntax) }
799 support::token(&self.syntax) 647 pub fn const_kw(&self) -> Option<ConstKw> { support::token(&self.syntax) }
800 } 648 pub fn unsafe_kw(&self) -> Option<UnsafeKw> { support::token(&self.syntax) }
801 pub fn const_kw(&self) -> Option<ConstKw> { 649 pub fn impl_kw(&self) -> Option<ImplKw> { support::token(&self.syntax) }
802 support::token(&self.syntax) 650 pub fn excl(&self) -> Option<Excl> { support::token(&self.syntax) }
803 } 651 pub fn for_kw(&self) -> Option<ForKw> { support::token(&self.syntax) }
804 pub fn unsafe_kw(&self) -> Option<UnsafeKw> { 652 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) }
805 support::token(&self.syntax)
806 }
807 pub fn impl_kw(&self) -> Option<ImplKw> {
808 support::token(&self.syntax)
809 }
810 pub fn excl(&self) -> Option<Excl> {
811 support::token(&self.syntax)
812 }
813 pub fn for_kw(&self) -> Option<ForKw> {
814 support::token(&self.syntax)
815 }
816 pub fn item_list(&self) -> Option<ItemList> {
817 support::child(&self.syntax)
818 }
819} 653}
820#[derive(Debug, Clone, PartialEq, Eq, Hash)] 654#[derive(Debug, Clone, PartialEq, Eq, Hash)]
821pub struct ParenType { 655pub struct ParenType {
@@ -840,20 +674,12 @@ impl AstNode for ParenType {
840 None 674 None
841 } 675 }
842 } 676 }
843 fn syntax(&self) -> &SyntaxNode { 677 fn syntax(&self) -> &SyntaxNode { &self.syntax }
844 &self.syntax
845 }
846} 678}
847impl ParenType { 679impl ParenType {
848 pub fn l_paren(&self) -> Option<LParen> { 680 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) }
849 support::token(&self.syntax) 681 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
850 } 682 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) }
851 pub fn type_ref(&self) -> Option<TypeRef> {
852 support::child(&self.syntax)
853 }
854 pub fn r_paren(&self) -> Option<RParen> {
855 support::token(&self.syntax)
856 }
857} 683}
858#[derive(Debug, Clone, PartialEq, Eq, Hash)] 684#[derive(Debug, Clone, PartialEq, Eq, Hash)]
859pub struct TupleType { 685pub struct TupleType {
@@ -878,20 +704,12 @@ impl AstNode for TupleType {
878 None 704 None
879 } 705 }
880 } 706 }
881 fn syntax(&self) -> &SyntaxNode { 707 fn syntax(&self) -> &SyntaxNode { &self.syntax }
882 &self.syntax
883 }
884} 708}
885impl TupleType { 709impl TupleType {
886 pub fn l_paren(&self) -> Option<LParen> { 710 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) }
887 support::token(&self.syntax) 711 pub fn fields(&self) -> AstChildren<TypeRef> { support::children(&self.syntax) }
888 } 712 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) }
889 pub fn fields(&self) -> AstChildren<TypeRef> {
890 support::children(&self.syntax)
891 }
892 pub fn r_paren(&self) -> Option<RParen> {
893 support::token(&self.syntax)
894 }
895} 713}
896#[derive(Debug, Clone, PartialEq, Eq, Hash)] 714#[derive(Debug, Clone, PartialEq, Eq, Hash)]
897pub struct NeverType { 715pub struct NeverType {
@@ -916,14 +734,10 @@ impl AstNode for NeverType {
916 None 734 None
917 } 735 }
918 } 736 }
919 fn syntax(&self) -> &SyntaxNode { 737 fn syntax(&self) -> &SyntaxNode { &self.syntax }
920 &self.syntax
921 }
922} 738}
923impl NeverType { 739impl NeverType {
924 pub fn excl(&self) -> Option<Excl> { 740 pub fn excl(&self) -> Option<Excl> { support::token(&self.syntax) }
925 support::token(&self.syntax)
926 }
927} 741}
928#[derive(Debug, Clone, PartialEq, Eq, Hash)] 742#[derive(Debug, Clone, PartialEq, Eq, Hash)]
929pub struct PathType { 743pub struct PathType {
@@ -948,14 +762,10 @@ impl AstNode for PathType {
948 None 762 None
949 } 763 }
950 } 764 }
951 fn syntax(&self) -> &SyntaxNode { 765 fn syntax(&self) -> &SyntaxNode { &self.syntax }
952 &self.syntax
953 }
954} 766}
955impl PathType { 767impl PathType {
956 pub fn path(&self) -> Option<Path> { 768 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
957 support::child(&self.syntax)
958 }
959} 769}
960#[derive(Debug, Clone, PartialEq, Eq, Hash)] 770#[derive(Debug, Clone, PartialEq, Eq, Hash)]
961pub struct PointerType { 771pub struct PointerType {
@@ -980,20 +790,12 @@ impl AstNode for PointerType {
980 None 790 None
981 } 791 }
982 } 792 }
983 fn syntax(&self) -> &SyntaxNode { 793 fn syntax(&self) -> &SyntaxNode { &self.syntax }
984 &self.syntax
985 }
986} 794}
987impl PointerType { 795impl PointerType {
988 pub fn star(&self) -> Option<Star> { 796 pub fn star(&self) -> Option<Star> { support::token(&self.syntax) }
989 support::token(&self.syntax) 797 pub fn const_kw(&self) -> Option<ConstKw> { support::token(&self.syntax) }
990 } 798 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
991 pub fn const_kw(&self) -> Option<ConstKw> {
992 support::token(&self.syntax)
993 }
994 pub fn type_ref(&self) -> Option<TypeRef> {
995 support::child(&self.syntax)
996 }
997} 799}
998#[derive(Debug, Clone, PartialEq, Eq, Hash)] 800#[derive(Debug, Clone, PartialEq, Eq, Hash)]
999pub struct ArrayType { 801pub struct ArrayType {
@@ -1018,26 +820,14 @@ impl AstNode for ArrayType {
1018 None 820 None
1019 } 821 }
1020 } 822 }
1021 fn syntax(&self) -> &SyntaxNode { 823 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1022 &self.syntax
1023 }
1024} 824}
1025impl ArrayType { 825impl ArrayType {
1026 pub fn l_brack(&self) -> Option<LBrack> { 826 pub fn l_brack(&self) -> Option<LBrack> { support::token(&self.syntax) }
1027 support::token(&self.syntax) 827 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
1028 } 828 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) }
1029 pub fn type_ref(&self) -> Option<TypeRef> { 829 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1030 support::child(&self.syntax) 830 pub fn r_brack(&self) -> Option<RBrack> { support::token(&self.syntax) }
1031 }
1032 pub fn semi(&self) -> Option<Semi> {
1033 support::token(&self.syntax)
1034 }
1035 pub fn expr(&self) -> Option<Expr> {
1036 support::child(&self.syntax)
1037 }
1038 pub fn r_brack(&self) -> Option<RBrack> {
1039 support::token(&self.syntax)
1040 }
1041} 831}
1042#[derive(Debug, Clone, PartialEq, Eq, Hash)] 832#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1043pub struct SliceType { 833pub struct SliceType {
@@ -1062,20 +852,12 @@ impl AstNode for SliceType {
1062 None 852 None
1063 } 853 }
1064 } 854 }
1065 fn syntax(&self) -> &SyntaxNode { 855 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1066 &self.syntax
1067 }
1068} 856}
1069impl SliceType { 857impl SliceType {
1070 pub fn l_brack(&self) -> Option<LBrack> { 858 pub fn l_brack(&self) -> Option<LBrack> { support::token(&self.syntax) }
1071 support::token(&self.syntax) 859 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
1072 } 860 pub fn r_brack(&self) -> Option<RBrack> { support::token(&self.syntax) }
1073 pub fn type_ref(&self) -> Option<TypeRef> {
1074 support::child(&self.syntax)
1075 }
1076 pub fn r_brack(&self) -> Option<RBrack> {
1077 support::token(&self.syntax)
1078 }
1079} 861}
1080#[derive(Debug, Clone, PartialEq, Eq, Hash)] 862#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1081pub struct ReferenceType { 863pub struct ReferenceType {
@@ -1100,23 +882,13 @@ impl AstNode for ReferenceType {
1100 None 882 None
1101 } 883 }
1102 } 884 }
1103 fn syntax(&self) -> &SyntaxNode { 885 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1104 &self.syntax
1105 }
1106} 886}
1107impl ReferenceType { 887impl ReferenceType {
1108 pub fn amp(&self) -> Option<Amp> { 888 pub fn amp(&self) -> Option<Amp> { support::token(&self.syntax) }
1109 support::token(&self.syntax) 889 pub fn lifetime(&self) -> Option<Lifetime> { support::token(&self.syntax) }
1110 } 890 pub fn mut_kw(&self) -> Option<MutKw> { support::token(&self.syntax) }
1111 pub fn lifetime(&self) -> Option<Lifetime> { 891 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
1112 support::token(&self.syntax)
1113 }
1114 pub fn mut_kw(&self) -> Option<MutKw> {
1115 support::token(&self.syntax)
1116 }
1117 pub fn type_ref(&self) -> Option<TypeRef> {
1118 support::child(&self.syntax)
1119 }
1120} 892}
1121#[derive(Debug, Clone, PartialEq, Eq, Hash)] 893#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1122pub struct PlaceholderType { 894pub struct PlaceholderType {
@@ -1141,14 +913,10 @@ impl AstNode for PlaceholderType {
1141 None 913 None
1142 } 914 }
1143 } 915 }
1144 fn syntax(&self) -> &SyntaxNode { 916 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1145 &self.syntax
1146 }
1147} 917}
1148impl PlaceholderType { 918impl PlaceholderType {
1149 pub fn underscore(&self) -> Option<Underscore> { 919 pub fn underscore(&self) -> Option<Underscore> { support::token(&self.syntax) }
1150 support::token(&self.syntax)
1151 }
1152} 920}
1153#[derive(Debug, Clone, PartialEq, Eq, Hash)] 921#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1154pub struct FnPointerType { 922pub struct FnPointerType {
@@ -1173,26 +941,14 @@ impl AstNode for FnPointerType {
1173 None 941 None
1174 } 942 }
1175 } 943 }
1176 fn syntax(&self) -> &SyntaxNode { 944 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1177 &self.syntax
1178 }
1179} 945}
1180impl FnPointerType { 946impl FnPointerType {
1181 pub fn abi(&self) -> Option<Abi> { 947 pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
1182 support::child(&self.syntax) 948 pub fn unsafe_kw(&self) -> Option<UnsafeKw> { support::token(&self.syntax) }
1183 } 949 pub fn fn_kw(&self) -> Option<FnKw> { support::token(&self.syntax) }
1184 pub fn unsafe_kw(&self) -> Option<UnsafeKw> { 950 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
1185 support::token(&self.syntax) 951 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
1186 }
1187 pub fn fn_kw(&self) -> Option<FnKw> {
1188 support::token(&self.syntax)
1189 }
1190 pub fn param_list(&self) -> Option<ParamList> {
1191 support::child(&self.syntax)
1192 }
1193 pub fn ret_type(&self) -> Option<RetType> {
1194 support::child(&self.syntax)
1195 }
1196} 952}
1197#[derive(Debug, Clone, PartialEq, Eq, Hash)] 953#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1198pub struct ForType { 954pub struct ForType {
@@ -1217,20 +973,12 @@ impl AstNode for ForType {
1217 None 973 None
1218 } 974 }
1219 } 975 }
1220 fn syntax(&self) -> &SyntaxNode { 976 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1221 &self.syntax
1222 }
1223} 977}
1224impl ForType { 978impl ForType {
1225 pub fn for_kw(&self) -> Option<ForKw> { 979 pub fn for_kw(&self) -> Option<ForKw> { support::token(&self.syntax) }
1226 support::token(&self.syntax) 980 pub fn type_param_list(&self) -> Option<TypeParamList> { support::child(&self.syntax) }
1227 } 981 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
1228 pub fn type_param_list(&self) -> Option<TypeParamList> {
1229 support::child(&self.syntax)
1230 }
1231 pub fn type_ref(&self) -> Option<TypeRef> {
1232 support::child(&self.syntax)
1233 }
1234} 982}
1235#[derive(Debug, Clone, PartialEq, Eq, Hash)] 983#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1236pub struct ImplTraitType { 984pub struct ImplTraitType {
@@ -1255,15 +1003,11 @@ impl AstNode for ImplTraitType {
1255 None 1003 None
1256 } 1004 }
1257 } 1005 }
1258 fn syntax(&self) -> &SyntaxNode { 1006 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1259 &self.syntax
1260 }
1261} 1007}
1262impl ast::TypeBoundsOwner for ImplTraitType {} 1008impl ast::TypeBoundsOwner for ImplTraitType {}
1263impl ImplTraitType { 1009impl ImplTraitType {
1264 pub fn impl_kw(&self) -> Option<ImplKw> { 1010 pub fn impl_kw(&self) -> Option<ImplKw> { support::token(&self.syntax) }
1265 support::token(&self.syntax)
1266 }
1267} 1011}
1268#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1012#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1269pub struct DynTraitType { 1013pub struct DynTraitType {
@@ -1288,15 +1032,11 @@ impl AstNode for DynTraitType {
1288 None 1032 None
1289 } 1033 }
1290 } 1034 }
1291 fn syntax(&self) -> &SyntaxNode { 1035 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1292 &self.syntax
1293 }
1294} 1036}
1295impl ast::TypeBoundsOwner for DynTraitType {} 1037impl ast::TypeBoundsOwner for DynTraitType {}
1296impl DynTraitType { 1038impl DynTraitType {
1297 pub fn dyn_kw(&self) -> Option<DynKw> { 1039 pub fn dyn_kw(&self) -> Option<DynKw> { support::token(&self.syntax) }
1298 support::token(&self.syntax)
1299 }
1300} 1040}
1301#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1041#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1302pub struct TupleExpr { 1042pub struct TupleExpr {
@@ -1321,21 +1061,13 @@ impl AstNode for TupleExpr {
1321 None 1061 None
1322 } 1062 }
1323 } 1063 }
1324 fn syntax(&self) -> &SyntaxNode { 1064 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1325 &self.syntax
1326 }
1327} 1065}
1328impl ast::AttrsOwner for TupleExpr {} 1066impl ast::AttrsOwner for TupleExpr {}
1329impl TupleExpr { 1067impl TupleExpr {
1330 pub fn l_paren(&self) -> Option<LParen> { 1068 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) }
1331 support::token(&self.syntax) 1069 pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
1332 } 1070 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) }
1333 pub fn exprs(&self) -> AstChildren<Expr> {
1334 support::children(&self.syntax)
1335 }
1336 pub fn r_paren(&self) -> Option<RParen> {
1337 support::token(&self.syntax)
1338 }
1339} 1071}
1340#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1072#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1341pub struct ArrayExpr { 1073pub struct ArrayExpr {
@@ -1360,24 +1092,14 @@ impl AstNode for ArrayExpr {
1360 None 1092 None
1361 } 1093 }
1362 } 1094 }
1363 fn syntax(&self) -> &SyntaxNode { 1095 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1364 &self.syntax
1365 }
1366} 1096}
1367impl ast::AttrsOwner for ArrayExpr {} 1097impl ast::AttrsOwner for ArrayExpr {}
1368impl ArrayExpr { 1098impl ArrayExpr {
1369 pub fn l_brack(&self) -> Option<LBrack> { 1099 pub fn l_brack(&self) -> Option<LBrack> { support::token(&self.syntax) }
1370 support::token(&self.syntax) 1100 pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
1371 } 1101 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) }
1372 pub fn exprs(&self) -> AstChildren<Expr> { 1102 pub fn r_brack(&self) -> Option<RBrack> { support::token(&self.syntax) }
1373 support::children(&self.syntax)
1374 }
1375 pub fn semi(&self) -> Option<Semi> {
1376 support::token(&self.syntax)
1377 }
1378 pub fn r_brack(&self) -> Option<RBrack> {
1379 support::token(&self.syntax)
1380 }
1381} 1103}
1382#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1104#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1383pub struct ParenExpr { 1105pub struct ParenExpr {
@@ -1402,21 +1124,13 @@ impl AstNode for ParenExpr {
1402 None 1124 None
1403 } 1125 }
1404 } 1126 }
1405 fn syntax(&self) -> &SyntaxNode { 1127 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1406 &self.syntax
1407 }
1408} 1128}
1409impl ast::AttrsOwner for ParenExpr {} 1129impl ast::AttrsOwner for ParenExpr {}
1410impl ParenExpr { 1130impl ParenExpr {
1411 pub fn l_paren(&self) -> Option<LParen> { 1131 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) }
1412 support::token(&self.syntax) 1132 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1413 } 1133 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) }
1414 pub fn expr(&self) -> Option<Expr> {
1415 support::child(&self.syntax)
1416 }
1417 pub fn r_paren(&self) -> Option<RParen> {
1418 support::token(&self.syntax)
1419 }
1420} 1134}
1421#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1135#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1422pub struct PathExpr { 1136pub struct PathExpr {
@@ -1441,14 +1155,10 @@ impl AstNode for PathExpr {
1441 None 1155 None
1442 } 1156 }
1443 } 1157 }
1444 fn syntax(&self) -> &SyntaxNode { 1158 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1445 &self.syntax
1446 }
1447} 1159}
1448impl PathExpr { 1160impl PathExpr {
1449 pub fn path(&self) -> Option<Path> { 1161 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1450 support::child(&self.syntax)
1451 }
1452} 1162}
1453#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1163#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1454pub struct LambdaExpr { 1164pub struct LambdaExpr {
@@ -1473,30 +1183,16 @@ impl AstNode for LambdaExpr {
1473 None 1183 None
1474 } 1184 }
1475 } 1185 }
1476 fn syntax(&self) -> &SyntaxNode { 1186 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1477 &self.syntax
1478 }
1479} 1187}
1480impl ast::AttrsOwner for LambdaExpr {} 1188impl ast::AttrsOwner for LambdaExpr {}
1481impl LambdaExpr { 1189impl LambdaExpr {
1482 pub fn static_kw(&self) -> Option<StaticKw> { 1190 pub fn static_kw(&self) -> Option<StaticKw> { support::token(&self.syntax) }
1483 support::token(&self.syntax) 1191 pub fn async_kw(&self) -> Option<AsyncKw> { support::token(&self.syntax) }
1484 } 1192 pub fn move_kw(&self) -> Option<MoveKw> { support::token(&self.syntax) }
1485 pub fn async_kw(&self) -> Option<AsyncKw> { 1193 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
1486 support::token(&self.syntax) 1194 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
1487 } 1195 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
1488 pub fn move_kw(&self) -> Option<MoveKw> {
1489 support::token(&self.syntax)
1490 }
1491 pub fn param_list(&self) -> Option<ParamList> {
1492 support::child(&self.syntax)
1493 }
1494 pub fn ret_type(&self) -> Option<RetType> {
1495 support::child(&self.syntax)
1496 }
1497 pub fn body(&self) -> Option<Expr> {
1498 support::child(&self.syntax)
1499 }
1500} 1196}
1501#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1197#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1502pub struct IfExpr { 1198pub struct IfExpr {
@@ -1521,18 +1217,12 @@ impl AstNode for IfExpr {
1521 None 1217 None
1522 } 1218 }
1523 } 1219 }
1524 fn syntax(&self) -> &SyntaxNode { 1220 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1525 &self.syntax
1526 }
1527} 1221}
1528impl ast::AttrsOwner for IfExpr {} 1222impl ast::AttrsOwner for IfExpr {}
1529impl IfExpr { 1223impl IfExpr {
1530 pub fn if_kw(&self) -> Option<IfKw> { 1224 pub fn if_kw(&self) -> Option<IfKw> { support::token(&self.syntax) }
1531 support::token(&self.syntax) 1225 pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) }
1532 }
1533 pub fn condition(&self) -> Option<Condition> {
1534 support::child(&self.syntax)
1535 }
1536} 1226}
1537#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1227#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1538pub struct LoopExpr { 1228pub struct LoopExpr {
@@ -1557,16 +1247,12 @@ impl AstNode for LoopExpr {
1557 None 1247 None
1558 } 1248 }
1559 } 1249 }
1560 fn syntax(&self) -> &SyntaxNode { 1250 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1561 &self.syntax
1562 }
1563} 1251}
1564impl ast::AttrsOwner for LoopExpr {} 1252impl ast::AttrsOwner for LoopExpr {}
1565impl ast::LoopBodyOwner for LoopExpr {} 1253impl ast::LoopBodyOwner for LoopExpr {}
1566impl LoopExpr { 1254impl LoopExpr {
1567 pub fn loop_kw(&self) -> Option<LoopKw> { 1255 pub fn loop_kw(&self) -> Option<LoopKw> { support::token(&self.syntax) }
1568 support::token(&self.syntax)
1569 }
1570} 1256}
1571#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1257#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1572pub struct TryBlockExpr { 1258pub struct TryBlockExpr {
@@ -1591,18 +1277,12 @@ impl AstNode for TryBlockExpr {
1591 None 1277 None
1592 } 1278 }
1593 } 1279 }
1594 fn syntax(&self) -> &SyntaxNode { 1280 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1595 &self.syntax
1596 }
1597} 1281}
1598impl ast::AttrsOwner for TryBlockExpr {} 1282impl ast::AttrsOwner for TryBlockExpr {}
1599impl TryBlockExpr { 1283impl TryBlockExpr {
1600 pub fn try_kw(&self) -> Option<TryKw> { 1284 pub fn try_kw(&self) -> Option<TryKw> { support::token(&self.syntax) }
1601 support::token(&self.syntax) 1285 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
1602 }
1603 pub fn body(&self) -> Option<BlockExpr> {
1604 support::child(&self.syntax)
1605 }
1606} 1286}
1607#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1287#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1608pub struct ForExpr { 1288pub struct ForExpr {
@@ -1627,25 +1307,15 @@ impl AstNode for ForExpr {
1627 None 1307 None
1628 } 1308 }
1629 } 1309 }
1630 fn syntax(&self) -> &SyntaxNode { 1310 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1631 &self.syntax
1632 }
1633} 1311}
1634impl ast::AttrsOwner for ForExpr {} 1312impl ast::AttrsOwner for ForExpr {}
1635impl ast::LoopBodyOwner for ForExpr {} 1313impl ast::LoopBodyOwner for ForExpr {}
1636impl ForExpr { 1314impl ForExpr {
1637 pub fn for_kw(&self) -> Option<ForKw> { 1315 pub fn for_kw(&self) -> Option<ForKw> { support::token(&self.syntax) }
1638 support::token(&self.syntax) 1316 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1639 } 1317 pub fn in_kw(&self) -> Option<InKw> { support::token(&self.syntax) }
1640 pub fn pat(&self) -> Option<Pat> { 1318 pub fn iterable(&self) -> Option<Expr> { support::child(&self.syntax) }
1641 support::child(&self.syntax)
1642 }
1643 pub fn in_kw(&self) -> Option<InKw> {
1644 support::token(&self.syntax)
1645 }
1646 pub fn iterable(&self) -> Option<Expr> {
1647 support::child(&self.syntax)
1648 }
1649} 1319}
1650#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1320#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1651pub struct WhileExpr { 1321pub struct WhileExpr {
@@ -1670,19 +1340,13 @@ impl AstNode for WhileExpr {
1670 None 1340 None
1671 } 1341 }
1672 } 1342 }
1673 fn syntax(&self) -> &SyntaxNode { 1343 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1674 &self.syntax
1675 }
1676} 1344}
1677impl ast::AttrsOwner for WhileExpr {} 1345impl ast::AttrsOwner for WhileExpr {}
1678impl ast::LoopBodyOwner for WhileExpr {} 1346impl ast::LoopBodyOwner for WhileExpr {}
1679impl WhileExpr { 1347impl WhileExpr {
1680 pub fn while_kw(&self) -> Option<WhileKw> { 1348 pub fn while_kw(&self) -> Option<WhileKw> { support::token(&self.syntax) }
1681 support::token(&self.syntax) 1349 pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) }
1682 }
1683 pub fn condition(&self) -> Option<Condition> {
1684 support::child(&self.syntax)
1685 }
1686} 1350}
1687#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1351#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1688pub struct ContinueExpr { 1352pub struct ContinueExpr {
@@ -1707,18 +1371,12 @@ impl AstNode for ContinueExpr {
1707 None 1371 None
1708 } 1372 }
1709 } 1373 }
1710 fn syntax(&self) -> &SyntaxNode { 1374 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1711 &self.syntax
1712 }
1713} 1375}
1714impl ast::AttrsOwner for ContinueExpr {} 1376impl ast::AttrsOwner for ContinueExpr {}
1715impl ContinueExpr { 1377impl ContinueExpr {
1716 pub fn continue_kw(&self) -> Option<ContinueKw> { 1378 pub fn continue_kw(&self) -> Option<ContinueKw> { support::token(&self.syntax) }
1717 support::token(&self.syntax) 1379 pub fn lifetime(&self) -> Option<Lifetime> { support::token(&self.syntax) }
1718 }
1719 pub fn lifetime(&self) -> Option<Lifetime> {
1720 support::token(&self.syntax)
1721 }
1722} 1380}
1723#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1381#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1724pub struct BreakExpr { 1382pub struct BreakExpr {
@@ -1743,21 +1401,13 @@ impl AstNode for BreakExpr {
1743 None 1401 None
1744 } 1402 }
1745 } 1403 }
1746 fn syntax(&self) -> &SyntaxNode { 1404 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1747 &self.syntax
1748 }
1749} 1405}
1750impl ast::AttrsOwner for BreakExpr {} 1406impl ast::AttrsOwner for BreakExpr {}
1751impl BreakExpr { 1407impl BreakExpr {
1752 pub fn break_kw(&self) -> Option<BreakKw> { 1408 pub fn break_kw(&self) -> Option<BreakKw> { support::token(&self.syntax) }
1753 support::token(&self.syntax) 1409 pub fn lifetime(&self) -> Option<Lifetime> { support::token(&self.syntax) }
1754 } 1410 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1755 pub fn lifetime(&self) -> Option<Lifetime> {
1756 support::token(&self.syntax)
1757 }
1758 pub fn expr(&self) -> Option<Expr> {
1759 support::child(&self.syntax)
1760 }
1761} 1411}
1762#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1412#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1763pub struct Label { 1413pub struct Label {
@@ -1782,14 +1432,10 @@ impl AstNode for Label {
1782 None 1432 None
1783 } 1433 }
1784 } 1434 }
1785 fn syntax(&self) -> &SyntaxNode { 1435 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1786 &self.syntax
1787 }
1788} 1436}
1789impl Label { 1437impl Label {
1790 pub fn lifetime(&self) -> Option<Lifetime> { 1438 pub fn lifetime(&self) -> Option<Lifetime> { support::token(&self.syntax) }
1791 support::token(&self.syntax)
1792 }
1793} 1439}
1794#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1440#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1795pub struct BlockExpr { 1441pub struct BlockExpr {
@@ -1814,21 +1460,13 @@ impl AstNode for BlockExpr {
1814 None 1460 None
1815 } 1461 }
1816 } 1462 }
1817 fn syntax(&self) -> &SyntaxNode { 1463 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1818 &self.syntax
1819 }
1820} 1464}
1821impl ast::AttrsOwner for BlockExpr {} 1465impl ast::AttrsOwner for BlockExpr {}
1822impl BlockExpr { 1466impl BlockExpr {
1823 pub fn label(&self) -> Option<Label> { 1467 pub fn label(&self) -> Option<Label> { support::child(&self.syntax) }
1824 support::child(&self.syntax) 1468 pub fn unsafe_kw(&self) -> Option<UnsafeKw> { support::token(&self.syntax) }
1825 } 1469 pub fn block(&self) -> Option<Block> { support::child(&self.syntax) }
1826 pub fn unsafe_kw(&self) -> Option<UnsafeKw> {
1827 support::token(&self.syntax)
1828 }
1829 pub fn block(&self) -> Option<Block> {
1830 support::child(&self.syntax)
1831 }
1832} 1470}
1833#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1471#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1834pub struct ReturnExpr { 1472pub struct ReturnExpr {
@@ -1853,15 +1491,11 @@ impl AstNode for ReturnExpr {
1853 None 1491 None
1854 } 1492 }
1855 } 1493 }
1856 fn syntax(&self) -> &SyntaxNode { 1494 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1857 &self.syntax
1858 }
1859} 1495}
1860impl ast::AttrsOwner for ReturnExpr {} 1496impl ast::AttrsOwner for ReturnExpr {}
1861impl ReturnExpr { 1497impl ReturnExpr {
1862 pub fn expr(&self) -> Option<Expr> { 1498 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1863 support::child(&self.syntax)
1864 }
1865} 1499}
1866#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1500#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1867pub struct CallExpr { 1501pub struct CallExpr {
@@ -1886,15 +1520,11 @@ impl AstNode for CallExpr {
1886 None 1520 None
1887 } 1521 }
1888 } 1522 }
1889 fn syntax(&self) -> &SyntaxNode { 1523 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1890 &self.syntax
1891 }
1892} 1524}
1893impl ast::ArgListOwner for CallExpr {} 1525impl ast::ArgListOwner for CallExpr {}
1894impl CallExpr { 1526impl CallExpr {
1895 pub fn expr(&self) -> Option<Expr> { 1527 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1896 support::child(&self.syntax)
1897 }
1898} 1528}
1899#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1529#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1900pub struct MethodCallExpr { 1530pub struct MethodCallExpr {
@@ -1919,25 +1549,15 @@ impl AstNode for MethodCallExpr {
1919 None 1549 None
1920 } 1550 }
1921 } 1551 }
1922 fn syntax(&self) -> &SyntaxNode { 1552 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1923 &self.syntax
1924 }
1925} 1553}
1926impl ast::AttrsOwner for MethodCallExpr {} 1554impl ast::AttrsOwner for MethodCallExpr {}
1927impl ast::ArgListOwner for MethodCallExpr {} 1555impl ast::ArgListOwner for MethodCallExpr {}
1928impl MethodCallExpr { 1556impl MethodCallExpr {
1929 pub fn expr(&self) -> Option<Expr> { 1557 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1930 support::child(&self.syntax) 1558 pub fn dot(&self) -> Option<Dot> { support::token(&self.syntax) }
1931 } 1559 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1932 pub fn dot(&self) -> Option<Dot> { 1560 pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) }
1933 support::token(&self.syntax)
1934 }
1935 pub fn name_ref(&self) -> Option<NameRef> {
1936 support::child(&self.syntax)
1937 }
1938 pub fn type_arg_list(&self) -> Option<TypeArgList> {
1939 support::child(&self.syntax)
1940 }
1941} 1561}
1942#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1562#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1943pub struct IndexExpr { 1563pub struct IndexExpr {
@@ -1962,18 +1582,12 @@ impl AstNode for IndexExpr {
1962 None 1582 None
1963 } 1583 }
1964 } 1584 }
1965 fn syntax(&self) -> &SyntaxNode { 1585 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1966 &self.syntax
1967 }
1968} 1586}
1969impl ast::AttrsOwner for IndexExpr {} 1587impl ast::AttrsOwner for IndexExpr {}
1970impl IndexExpr { 1588impl IndexExpr {
1971 pub fn l_brack(&self) -> Option<LBrack> { 1589 pub fn l_brack(&self) -> Option<LBrack> { support::token(&self.syntax) }
1972 support::token(&self.syntax) 1590 pub fn r_brack(&self) -> Option<RBrack> { support::token(&self.syntax) }
1973 }
1974 pub fn r_brack(&self) -> Option<RBrack> {
1975 support::token(&self.syntax)
1976 }
1977} 1591}
1978#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1592#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1979pub struct FieldExpr { 1593pub struct FieldExpr {
@@ -1998,21 +1612,13 @@ impl AstNode for FieldExpr {
1998 None 1612 None
1999 } 1613 }
2000 } 1614 }
2001 fn syntax(&self) -> &SyntaxNode { 1615 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2002 &self.syntax
2003 }
2004} 1616}
2005impl ast::AttrsOwner for FieldExpr {} 1617impl ast::AttrsOwner for FieldExpr {}
2006impl FieldExpr { 1618impl FieldExpr {
2007 pub fn expr(&self) -> Option<Expr> { 1619 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2008 support::child(&self.syntax) 1620 pub fn dot(&self) -> Option<Dot> { support::token(&self.syntax) }
2009 } 1621 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
2010 pub fn dot(&self) -> Option<Dot> {
2011 support::token(&self.syntax)
2012 }
2013 pub fn name_ref(&self) -> Option<NameRef> {
2014 support::child(&self.syntax)
2015 }
2016} 1622}
2017#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1623#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2018pub struct AwaitExpr { 1624pub struct AwaitExpr {
@@ -2037,21 +1643,13 @@ impl AstNode for AwaitExpr {
2037 None 1643 None
2038 } 1644 }
2039 } 1645 }
2040 fn syntax(&self) -> &SyntaxNode { 1646 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2041 &self.syntax
2042 }
2043} 1647}
2044impl ast::AttrsOwner for AwaitExpr {} 1648impl ast::AttrsOwner for AwaitExpr {}
2045impl AwaitExpr { 1649impl AwaitExpr {
2046 pub fn expr(&self) -> Option<Expr> { 1650 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2047 support::child(&self.syntax) 1651 pub fn dot(&self) -> Option<Dot> { support::token(&self.syntax) }
2048 } 1652 pub fn await_kw(&self) -> Option<AwaitKw> { support::token(&self.syntax) }
2049 pub fn dot(&self) -> Option<Dot> {
2050 support::token(&self.syntax)
2051 }
2052 pub fn await_kw(&self) -> Option<AwaitKw> {
2053 support::token(&self.syntax)
2054 }
2055} 1653}
2056#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1654#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2057pub struct TryExpr { 1655pub struct TryExpr {
@@ -2076,18 +1674,12 @@ impl AstNode for TryExpr {
2076 None 1674 None
2077 } 1675 }
2078 } 1676 }
2079 fn syntax(&self) -> &SyntaxNode { 1677 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2080 &self.syntax
2081 }
2082} 1678}
2083impl ast::AttrsOwner for TryExpr {} 1679impl ast::AttrsOwner for TryExpr {}
2084impl TryExpr { 1680impl TryExpr {
2085 pub fn try_kw(&self) -> Option<TryKw> { 1681 pub fn try_kw(&self) -> Option<TryKw> { support::token(&self.syntax) }
2086 support::token(&self.syntax) 1682 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2087 }
2088 pub fn expr(&self) -> Option<Expr> {
2089 support::child(&self.syntax)
2090 }
2091} 1683}
2092#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1684#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2093pub struct CastExpr { 1685pub struct CastExpr {
@@ -2112,21 +1704,13 @@ impl AstNode for CastExpr {
2112 None 1704 None
2113 } 1705 }
2114 } 1706 }
2115 fn syntax(&self) -> &SyntaxNode { 1707 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2116 &self.syntax
2117 }
2118} 1708}
2119impl ast::AttrsOwner for CastExpr {} 1709impl ast::AttrsOwner for CastExpr {}
2120impl CastExpr { 1710impl CastExpr {
2121 pub fn expr(&self) -> Option<Expr> { 1711 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2122 support::child(&self.syntax) 1712 pub fn as_kw(&self) -> Option<AsKw> { support::token(&self.syntax) }
2123 } 1713 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
2124 pub fn as_kw(&self) -> Option<AsKw> {
2125 support::token(&self.syntax)
2126 }
2127 pub fn type_ref(&self) -> Option<TypeRef> {
2128 support::child(&self.syntax)
2129 }
2130} 1714}
2131#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1715#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2132pub struct RefExpr { 1716pub struct RefExpr {
@@ -2151,24 +1735,14 @@ impl AstNode for RefExpr {
2151 None 1735 None
2152 } 1736 }
2153 } 1737 }
2154 fn syntax(&self) -> &SyntaxNode { 1738 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2155 &self.syntax
2156 }
2157} 1739}
2158impl ast::AttrsOwner for RefExpr {} 1740impl ast::AttrsOwner for RefExpr {}
2159impl RefExpr { 1741impl RefExpr {
2160 pub fn amp(&self) -> Option<Amp> { 1742 pub fn amp(&self) -> Option<Amp> { support::token(&self.syntax) }
2161 support::token(&self.syntax) 1743 pub fn raw_kw(&self) -> Option<RawKw> { support::token(&self.syntax) }
2162 } 1744 pub fn mut_kw(&self) -> Option<MutKw> { support::token(&self.syntax) }
2163 pub fn raw_kw(&self) -> Option<RawKw> { 1745 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2164 support::token(&self.syntax)
2165 }
2166 pub fn mut_kw(&self) -> Option<MutKw> {
2167 support::token(&self.syntax)
2168 }
2169 pub fn expr(&self) -> Option<Expr> {
2170 support::child(&self.syntax)
2171 }
2172} 1746}
2173#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1747#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2174pub struct PrefixExpr { 1748pub struct PrefixExpr {
@@ -2193,18 +1767,12 @@ impl AstNode for PrefixExpr {
2193 None 1767 None
2194 } 1768 }
2195 } 1769 }
2196 fn syntax(&self) -> &SyntaxNode { 1770 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2197 &self.syntax
2198 }
2199} 1771}
2200impl ast::AttrsOwner for PrefixExpr {} 1772impl ast::AttrsOwner for PrefixExpr {}
2201impl PrefixExpr { 1773impl PrefixExpr {
2202 pub fn prefix_op(&self) -> Option<PrefixOp> { 1774 pub fn prefix_op(&self) -> Option<PrefixOp> { support::token(&self.syntax) }
2203 support::token(&self.syntax) 1775 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2204 }
2205 pub fn expr(&self) -> Option<Expr> {
2206 support::child(&self.syntax)
2207 }
2208} 1776}
2209#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1777#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2210pub struct BoxExpr { 1778pub struct BoxExpr {
@@ -2229,18 +1797,12 @@ impl AstNode for BoxExpr {
2229 None 1797 None
2230 } 1798 }
2231 } 1799 }
2232 fn syntax(&self) -> &SyntaxNode { 1800 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2233 &self.syntax
2234 }
2235} 1801}
2236impl ast::AttrsOwner for BoxExpr {} 1802impl ast::AttrsOwner for BoxExpr {}
2237impl BoxExpr { 1803impl BoxExpr {
2238 pub fn box_kw(&self) -> Option<BoxKw> { 1804 pub fn box_kw(&self) -> Option<BoxKw> { support::token(&self.syntax) }
2239 support::token(&self.syntax) 1805 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2240 }
2241 pub fn expr(&self) -> Option<Expr> {
2242 support::child(&self.syntax)
2243 }
2244} 1806}
2245#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1807#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2246pub struct RangeExpr { 1808pub struct RangeExpr {
@@ -2265,15 +1827,11 @@ impl AstNode for RangeExpr {
2265 None 1827 None
2266 } 1828 }
2267 } 1829 }
2268 fn syntax(&self) -> &SyntaxNode { 1830 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2269 &self.syntax
2270 }
2271} 1831}
2272impl ast::AttrsOwner for RangeExpr {} 1832impl ast::AttrsOwner for RangeExpr {}
2273impl RangeExpr { 1833impl RangeExpr {
2274 pub fn range_op(&self) -> Option<RangeOp> { 1834 pub fn range_op(&self) -> Option<RangeOp> { support::token(&self.syntax) }
2275 support::token(&self.syntax)
2276 }
2277} 1835}
2278#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1836#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2279pub struct BinExpr { 1837pub struct BinExpr {
@@ -2298,15 +1856,11 @@ impl AstNode for BinExpr {
2298 None 1856 None
2299 } 1857 }
2300 } 1858 }
2301 fn syntax(&self) -> &SyntaxNode { 1859 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2302 &self.syntax
2303 }
2304} 1860}
2305impl ast::AttrsOwner for BinExpr {} 1861impl ast::AttrsOwner for BinExpr {}
2306impl BinExpr { 1862impl BinExpr {
2307 pub fn bin_op(&self) -> Option<BinOp> { 1863 pub fn bin_op(&self) -> Option<BinOp> { support::token(&self.syntax) }
2308 support::token(&self.syntax)
2309 }
2310} 1864}
2311#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1865#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2312pub struct Literal { 1866pub struct Literal {
@@ -2331,14 +1885,10 @@ impl AstNode for Literal {
2331 None 1885 None
2332 } 1886 }
2333 } 1887 }
2334 fn syntax(&self) -> &SyntaxNode { 1888 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2335 &self.syntax
2336 }
2337} 1889}
2338impl Literal { 1890impl Literal {
2339 pub fn literal_token(&self) -> Option<LiteralToken> { 1891 pub fn literal_token(&self) -> Option<LiteralToken> { support::token(&self.syntax) }
2340 support::token(&self.syntax)
2341 }
2342} 1892}
2343#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1893#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2344pub struct MatchExpr { 1894pub struct MatchExpr {
@@ -2363,21 +1913,13 @@ impl AstNode for MatchExpr {
2363 None 1913 None
2364 } 1914 }
2365 } 1915 }
2366 fn syntax(&self) -> &SyntaxNode { 1916 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2367 &self.syntax
2368 }
2369} 1917}
2370impl ast::AttrsOwner for MatchExpr {} 1918impl ast::AttrsOwner for MatchExpr {}
2371impl MatchExpr { 1919impl MatchExpr {
2372 pub fn match_kw(&self) -> Option<MatchKw> { 1920 pub fn match_kw(&self) -> Option<MatchKw> { support::token(&self.syntax) }
2373 support::token(&self.syntax) 1921 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2374 } 1922 pub fn match_arm_list(&self) -> Option<MatchArmList> { support::child(&self.syntax) }
2375 pub fn expr(&self) -> Option<Expr> {
2376 support::child(&self.syntax)
2377 }
2378 pub fn match_arm_list(&self) -> Option<MatchArmList> {
2379 support::child(&self.syntax)
2380 }
2381} 1923}
2382#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1924#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2383pub struct MatchArmList { 1925pub struct MatchArmList {
@@ -2402,21 +1944,13 @@ impl AstNode for MatchArmList {
2402 None 1944 None
2403 } 1945 }
2404 } 1946 }
2405 fn syntax(&self) -> &SyntaxNode { 1947 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2406 &self.syntax
2407 }
2408} 1948}
2409impl ast::AttrsOwner for MatchArmList {} 1949impl ast::AttrsOwner for MatchArmList {}
2410impl MatchArmList { 1950impl MatchArmList {
2411 pub fn l_curly(&self) -> Option<LCurly> { 1951 pub fn l_curly(&self) -> Option<LCurly> { support::token(&self.syntax) }
2412 support::token(&self.syntax) 1952 pub fn arms(&self) -> AstChildren<MatchArm> { support::children(&self.syntax) }
2413 } 1953 pub fn r_curly(&self) -> Option<RCurly> { support::token(&self.syntax) }
2414 pub fn arms(&self) -> AstChildren<MatchArm> {
2415 support::children(&self.syntax)
2416 }
2417 pub fn r_curly(&self) -> Option<RCurly> {
2418 support::token(&self.syntax)
2419 }
2420} 1954}
2421#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1955#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2422pub struct MatchArm { 1956pub struct MatchArm {
@@ -2441,24 +1975,14 @@ impl AstNode for MatchArm {
2441 None 1975 None
2442 } 1976 }
2443 } 1977 }
2444 fn syntax(&self) -> &SyntaxNode { 1978 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2445 &self.syntax
2446 }
2447} 1979}
2448impl ast::AttrsOwner for MatchArm {} 1980impl ast::AttrsOwner for MatchArm {}
2449impl MatchArm { 1981impl MatchArm {
2450 pub fn pat(&self) -> Option<Pat> { 1982 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
2451 support::child(&self.syntax) 1983 pub fn guard(&self) -> Option<MatchGuard> { support::child(&self.syntax) }
2452 } 1984 pub fn fat_arrow(&self) -> Option<FatArrow> { support::token(&self.syntax) }
2453 pub fn guard(&self) -> Option<MatchGuard> { 1985 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2454 support::child(&self.syntax)
2455 }
2456 pub fn fat_arrow(&self) -> Option<FatArrow> {
2457 support::token(&self.syntax)
2458 }
2459 pub fn expr(&self) -> Option<Expr> {
2460 support::child(&self.syntax)
2461 }
2462} 1986}
2463#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1987#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2464pub struct MatchGuard { 1988pub struct MatchGuard {
@@ -2483,17 +2007,11 @@ impl AstNode for MatchGuard {
2483 None 2007 None
2484 } 2008 }
2485 } 2009 }
2486 fn syntax(&self) -> &SyntaxNode { 2010 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2487 &self.syntax
2488 }
2489} 2011}
2490impl MatchGuard { 2012impl MatchGuard {
2491 pub fn if_kw(&self) -> Option<IfKw> { 2013 pub fn if_kw(&self) -> Option<IfKw> { support::token(&self.syntax) }
2492 support::token(&self.syntax) 2014 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2493 }
2494 pub fn expr(&self) -> Option<Expr> {
2495 support::child(&self.syntax)
2496 }
2497} 2015}
2498#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2016#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2499pub struct RecordLit { 2017pub struct RecordLit {
@@ -2518,17 +2036,11 @@ impl AstNode for RecordLit {
2518 None 2036 None
2519 } 2037 }
2520 } 2038 }
2521 fn syntax(&self) -> &SyntaxNode { 2039 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2522 &self.syntax
2523 }
2524} 2040}
2525impl RecordLit { 2041impl RecordLit {
2526 pub fn path(&self) -> Option<Path> { 2042 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
2527 support::child(&self.syntax) 2043 pub fn record_field_list(&self) -> Option<RecordFieldList> { support::child(&self.syntax) }
2528 }
2529 pub fn record_field_list(&self) -> Option<RecordFieldList> {
2530 support::child(&self.syntax)
2531 }
2532} 2044}
2533#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2045#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2534pub struct RecordFieldList { 2046pub struct RecordFieldList {
@@ -2553,26 +2065,14 @@ impl AstNode for RecordFieldList {
2553 None 2065 None
2554 } 2066 }
2555 } 2067 }
2556 fn syntax(&self) -> &SyntaxNode { 2068 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2557 &self.syntax
2558 }
2559} 2069}
2560impl RecordFieldList { 2070impl RecordFieldList {
2561 pub fn l_curly(&self) -> Option<LCurly> { 2071 pub fn l_curly(&self) -> Option<LCurly> { support::token(&self.syntax) }
2562 support::token(&self.syntax) 2072 pub fn fields(&self) -> AstChildren<RecordField> { support::children(&self.syntax) }
2563 } 2073 pub fn dotdot(&self) -> Option<Dotdot> { support::token(&self.syntax) }
2564 pub fn fields(&self) -> AstChildren<RecordField> { 2074 pub fn spread(&self) -> Option<Expr> { support::child(&self.syntax) }
2565 support::children(&self.syntax) 2075 pub fn r_curly(&self) -> Option<RCurly> { support::token(&self.syntax) }
2566 }
2567 pub fn dotdot(&self) -> Option<Dotdot> {
2568 support::token(&self.syntax)
2569 }
2570 pub fn spread(&self) -> Option<Expr> {
2571 support::child(&self.syntax)
2572 }
2573 pub fn r_curly(&self) -> Option<RCurly> {
2574 support::token(&self.syntax)
2575 }
2576} 2076}
2577#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2077#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2578pub struct RecordField { 2078pub struct RecordField {
@@ -2597,21 +2097,13 @@ impl AstNode for RecordField {
2597 None 2097 None
2598 } 2098 }
2599 } 2099 }
2600 fn syntax(&self) -> &SyntaxNode { 2100 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2601 &self.syntax
2602 }
2603} 2101}
2604impl ast::AttrsOwner for RecordField {} 2102impl ast::AttrsOwner for RecordField {}
2605impl RecordField { 2103impl RecordField {
2606 pub fn name_ref(&self) -> Option<NameRef> { 2104 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
2607 support::child(&self.syntax) 2105 pub fn colon(&self) -> Option<Colon> { support::token(&self.syntax) }
2608 } 2106 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2609 pub fn colon(&self) -> Option<Colon> {
2610 support::token(&self.syntax)
2611 }
2612 pub fn expr(&self) -> Option<Expr> {
2613 support::child(&self.syntax)
2614 }
2615} 2107}
2616#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2108#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2617pub struct OrPat { 2109pub struct OrPat {
@@ -2636,14 +2128,10 @@ impl AstNode for OrPat {
2636 None 2128 None
2637 } 2129 }
2638 } 2130 }
2639 fn syntax(&self) -> &SyntaxNode { 2131 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2640 &self.syntax
2641 }
2642} 2132}
2643impl OrPat { 2133impl OrPat {
2644 pub fn pats(&self) -> AstChildren<Pat> { 2134 pub fn pats(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
2645 support::children(&self.syntax)
2646 }
2647} 2135}
2648#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2136#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2649pub struct ParenPat { 2137pub struct ParenPat {
@@ -2668,20 +2156,12 @@ impl AstNode for ParenPat {
2668 None 2156 None
2669 } 2157 }
2670 } 2158 }
2671 fn syntax(&self) -> &SyntaxNode { 2159 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2672 &self.syntax
2673 }
2674} 2160}
2675impl ParenPat { 2161impl ParenPat {
2676 pub fn l_paren(&self) -> Option<LParen> { 2162 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) }
2677 support::token(&self.syntax) 2163 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
2678 } 2164 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) }
2679 pub fn pat(&self) -> Option<Pat> {
2680 support::child(&self.syntax)
2681 }
2682 pub fn r_paren(&self) -> Option<RParen> {
2683 support::token(&self.syntax)
2684 }
2685} 2165}
2686#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2166#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2687pub struct RefPat { 2167pub struct RefPat {
@@ -2706,20 +2186,12 @@ impl AstNode for RefPat {
2706 None 2186 None
2707 } 2187 }
2708 } 2188 }
2709 fn syntax(&self) -> &SyntaxNode { 2189 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2710 &self.syntax
2711 }
2712} 2190}
2713impl RefPat { 2191impl RefPat {
2714 pub fn amp(&self) -> Option<Amp> { 2192 pub fn amp(&self) -> Option<Amp> { support::token(&self.syntax) }
2715 support::token(&self.syntax) 2193 pub fn mut_kw(&self) -> Option<MutKw> { support::token(&self.syntax) }
2716 } 2194 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
2717 pub fn mut_kw(&self) -> Option<MutKw> {
2718 support::token(&self.syntax)
2719 }
2720 pub fn pat(&self) -> Option<Pat> {
2721 support::child(&self.syntax)
2722 }
2723} 2195}
2724#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2196#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2725pub struct BoxPat { 2197pub struct BoxPat {
@@ -2744,17 +2216,11 @@ impl AstNode for BoxPat {
2744 None 2216 None
2745 } 2217 }
2746 } 2218 }
2747 fn syntax(&self) -> &SyntaxNode { 2219 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2748 &self.syntax
2749 }
2750} 2220}
2751impl BoxPat { 2221impl BoxPat {
2752 pub fn box_kw(&self) -> Option<BoxKw> { 2222 pub fn box_kw(&self) -> Option<BoxKw> { support::token(&self.syntax) }
2753 support::token(&self.syntax) 2223 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
2754 }
2755 pub fn pat(&self) -> Option<Pat> {
2756 support::child(&self.syntax)
2757 }
2758} 2224}
2759#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2225#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2760pub struct BindPat { 2226pub struct BindPat {
@@ -2779,22 +2245,14 @@ impl AstNode for BindPat {
2779 None 2245 None
2780 } 2246 }
2781 } 2247 }
2782 fn syntax(&self) -> &SyntaxNode { 2248 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2783 &self.syntax
2784 }
2785} 2249}
2786impl ast::AttrsOwner for BindPat {} 2250impl ast::AttrsOwner for BindPat {}
2787impl ast::NameOwner for BindPat {} 2251impl ast::NameOwner for BindPat {}
2788impl BindPat { 2252impl BindPat {
2789 pub fn ref_kw(&self) -> Option<RefKw> { 2253 pub fn ref_kw(&self) -> Option<RefKw> { support::token(&self.syntax) }
2790 support::token(&self.syntax) 2254 pub fn mut_kw(&self) -> Option<MutKw> { support::token(&self.syntax) }
2791 } 2255 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
2792 pub fn mut_kw(&self) -> Option<MutKw> {
2793 support::token(&self.syntax)
2794 }
2795 pub fn pat(&self) -> Option<Pat> {
2796 support::child(&self.syntax)
2797 }
2798} 2256}
2799#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2257#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2800pub struct PlaceholderPat { 2258pub struct PlaceholderPat {
@@ -2819,14 +2277,10 @@ impl AstNode for PlaceholderPat {
2819 None 2277 None
2820 } 2278 }
2821 } 2279 }
2822 fn syntax(&self) -> &SyntaxNode { 2280 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2823 &self.syntax
2824 }
2825} 2281}
2826impl PlaceholderPat { 2282impl PlaceholderPat {
2827 pub fn underscore(&self) -> Option<Underscore> { 2283 pub fn underscore(&self) -> Option<Underscore> { support::token(&self.syntax) }
2828 support::token(&self.syntax)
2829 }
2830} 2284}
2831#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2285#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2832pub struct DotDotPat { 2286pub struct DotDotPat {
@@ -2851,14 +2305,10 @@ impl AstNode for DotDotPat {
2851 None 2305 None
2852 } 2306 }
2853 } 2307 }
2854 fn syntax(&self) -> &SyntaxNode { 2308 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2855 &self.syntax
2856 }
2857} 2309}
2858impl DotDotPat { 2310impl DotDotPat {
2859 pub fn dotdot(&self) -> Option<Dotdot> { 2311 pub fn dotdot(&self) -> Option<Dotdot> { support::token(&self.syntax) }
2860 support::token(&self.syntax)
2861 }
2862} 2312}
2863#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2313#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2864pub struct PathPat { 2314pub struct PathPat {
@@ -2883,14 +2333,10 @@ impl AstNode for PathPat {
2883 None 2333 None
2884 } 2334 }
2885 } 2335 }
2886 fn syntax(&self) -> &SyntaxNode { 2336 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2887 &self.syntax
2888 }
2889} 2337}
2890impl PathPat { 2338impl PathPat {
2891 pub fn path(&self) -> Option<Path> { 2339 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
2892 support::child(&self.syntax)
2893 }
2894} 2340}
2895#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2341#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2896pub struct SlicePat { 2342pub struct SlicePat {
@@ -2915,20 +2361,12 @@ impl AstNode for SlicePat {
2915 None 2361 None
2916 } 2362 }
2917 } 2363 }
2918 fn syntax(&self) -> &SyntaxNode { 2364 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2919 &self.syntax
2920 }
2921} 2365}
2922impl SlicePat { 2366impl SlicePat {
2923 pub fn l_brack(&self) -> Option<LBrack> { 2367 pub fn l_brack(&self) -> Option<LBrack> { support::token(&self.syntax) }
2924 support::token(&self.syntax) 2368 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
2925 } 2369 pub fn r_brack(&self) -> Option<RBrack> { support::token(&self.syntax) }
2926 pub fn args(&self) -> AstChildren<Pat> {
2927 support::children(&self.syntax)
2928 }
2929 pub fn r_brack(&self) -> Option<RBrack> {
2930 support::token(&self.syntax)
2931 }
2932} 2370}
2933#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2371#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2934pub struct RangePat { 2372pub struct RangePat {
@@ -2953,14 +2391,10 @@ impl AstNode for RangePat {
2953 None 2391 None
2954 } 2392 }
2955 } 2393 }
2956 fn syntax(&self) -> &SyntaxNode { 2394 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2957 &self.syntax
2958 }
2959} 2395}
2960impl RangePat { 2396impl RangePat {
2961 pub fn range_separator(&self) -> Option<RangeSeparator> { 2397 pub fn range_separator(&self) -> Option<RangeSeparator> { support::token(&self.syntax) }
2962 support::token(&self.syntax)
2963 }
2964} 2398}
2965#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2399#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2966pub struct LiteralPat { 2400pub struct LiteralPat {
@@ -2985,14 +2419,10 @@ impl AstNode for LiteralPat {
2985 None 2419 None
2986 } 2420 }
2987 } 2421 }
2988 fn syntax(&self) -> &SyntaxNode { 2422 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2989 &self.syntax
2990 }
2991} 2423}
2992impl LiteralPat { 2424impl LiteralPat {
2993 pub fn literal(&self) -> Option<Literal> { 2425 pub fn literal(&self) -> Option<Literal> { support::child(&self.syntax) }
2994 support::child(&self.syntax)
2995 }
2996} 2426}
2997#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2427#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2998pub struct MacroPat { 2428pub struct MacroPat {
@@ -3017,14 +2447,10 @@ impl AstNode for MacroPat {
3017 None 2447 None
3018 } 2448 }
3019 } 2449 }
3020 fn syntax(&self) -> &SyntaxNode { 2450 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3021 &self.syntax
3022 }
3023} 2451}
3024impl MacroPat { 2452impl MacroPat {
3025 pub fn macro_call(&self) -> Option<MacroCall> { 2453 pub fn macro_call(&self) -> Option<MacroCall> { support::child(&self.syntax) }
3026 support::child(&self.syntax)
3027 }
3028} 2454}
3029#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2455#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3030pub struct RecordPat { 2456pub struct RecordPat {
@@ -3049,17 +2475,13 @@ impl AstNode for RecordPat {
3049 None 2475 None
3050 } 2476 }
3051 } 2477 }
3052 fn syntax(&self) -> &SyntaxNode { 2478 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3053 &self.syntax
3054 }
3055} 2479}
3056impl RecordPat { 2480impl RecordPat {
3057 pub fn record_field_pat_list(&self) -> Option<RecordFieldPatList> { 2481 pub fn record_field_pat_list(&self) -> Option<RecordFieldPatList> {
3058 support::child(&self.syntax) 2482 support::child(&self.syntax)
3059 } 2483 }
3060 pub fn path(&self) -> Option<Path> { 2484 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
3061 support::child(&self.syntax)
3062 }
3063} 2485}
3064#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2486#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3065pub struct RecordFieldPatList { 2487pub struct RecordFieldPatList {
@@ -3084,29 +2506,17 @@ impl AstNode for RecordFieldPatList {
3084 None 2506 None
3085 } 2507 }
3086 } 2508 }
3087 fn syntax(&self) -> &SyntaxNode { 2509 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3088 &self.syntax
3089 }
3090} 2510}
3091impl RecordFieldPatList { 2511impl RecordFieldPatList {
3092 pub fn l_curly(&self) -> Option<LCurly> { 2512 pub fn l_curly(&self) -> Option<LCurly> { support::token(&self.syntax) }
3093 support::token(&self.syntax) 2513 pub fn pats(&self) -> AstChildren<RecordInnerPat> { support::children(&self.syntax) }
3094 }
3095 pub fn pats(&self) -> AstChildren<RecordInnerPat> {
3096 support::children(&self.syntax)
3097 }
3098 pub fn record_field_pats(&self) -> AstChildren<RecordFieldPat> { 2514 pub fn record_field_pats(&self) -> AstChildren<RecordFieldPat> {
3099 support::children(&self.syntax) 2515 support::children(&self.syntax)
3100 } 2516 }
3101 pub fn bind_pats(&self) -> AstChildren<BindPat> { 2517 pub fn bind_pats(&self) -> AstChildren<BindPat> { support::children(&self.syntax) }
3102 support::children(&self.syntax) 2518 pub fn dotdot(&self) -> Option<Dotdot> { support::token(&self.syntax) }
3103 } 2519 pub fn r_curly(&self) -> Option<RCurly> { support::token(&self.syntax) }
3104 pub fn dotdot(&self) -> Option<Dotdot> {
3105 support::token(&self.syntax)
3106 }
3107 pub fn r_curly(&self) -> Option<RCurly> {
3108 support::token(&self.syntax)
3109 }
3110} 2520}
3111#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2521#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3112pub struct RecordFieldPat { 2522pub struct RecordFieldPat {
@@ -3131,19 +2541,13 @@ impl AstNode for RecordFieldPat {
3131 None 2541 None
3132 } 2542 }
3133 } 2543 }
3134 fn syntax(&self) -> &SyntaxNode { 2544 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3135 &self.syntax
3136 }
3137} 2545}
3138impl ast::AttrsOwner for RecordFieldPat {} 2546impl ast::AttrsOwner for RecordFieldPat {}
3139impl ast::NameOwner for RecordFieldPat {} 2547impl ast::NameOwner for RecordFieldPat {}
3140impl RecordFieldPat { 2548impl RecordFieldPat {
3141 pub fn colon(&self) -> Option<Colon> { 2549 pub fn colon(&self) -> Option<Colon> { support::token(&self.syntax) }
3142 support::token(&self.syntax) 2550 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
3143 }
3144 pub fn pat(&self) -> Option<Pat> {
3145 support::child(&self.syntax)
3146 }
3147} 2551}
3148#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2552#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3149pub struct TupleStructPat { 2553pub struct TupleStructPat {
@@ -3168,23 +2572,13 @@ impl AstNode for TupleStructPat {
3168 None 2572 None
3169 } 2573 }
3170 } 2574 }
3171 fn syntax(&self) -> &SyntaxNode { 2575 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3172 &self.syntax
3173 }
3174} 2576}
3175impl TupleStructPat { 2577impl TupleStructPat {
3176 pub fn path(&self) -> Option<Path> { 2578 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
3177 support::child(&self.syntax) 2579 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) }
3178 } 2580 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
3179 pub fn l_paren(&self) -> Option<LParen> { 2581 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) }
3180 support::token(&self.syntax)
3181 }
3182 pub fn args(&self) -> AstChildren<Pat> {
3183 support::children(&self.syntax)
3184 }
3185 pub fn r_paren(&self) -> Option<RParen> {
3186 support::token(&self.syntax)
3187 }
3188} 2582}
3189#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2583#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3190pub struct TuplePat { 2584pub struct TuplePat {
@@ -3209,20 +2603,12 @@ impl AstNode for TuplePat {
3209 None 2603 None
3210 } 2604 }
3211 } 2605 }
3212 fn syntax(&self) -> &SyntaxNode { 2606 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3213 &self.syntax
3214 }
3215} 2607}
3216impl TuplePat { 2608impl TuplePat {
3217 pub fn l_paren(&self) -> Option<LParen> { 2609 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) }
3218 support::token(&self.syntax) 2610 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
3219 } 2611 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) }
3220 pub fn args(&self) -> AstChildren<Pat> {
3221 support::children(&self.syntax)
3222 }
3223 pub fn r_paren(&self) -> Option<RParen> {
3224 support::token(&self.syntax)
3225 }
3226} 2612}
3227#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2613#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3228pub struct Visibility { 2614pub struct Visibility {
@@ -3247,23 +2633,13 @@ impl AstNode for Visibility {
3247 None 2633 None
3248 } 2634 }
3249 } 2635 }
3250 fn syntax(&self) -> &SyntaxNode { 2636 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3251 &self.syntax
3252 }
3253} 2637}
3254impl Visibility { 2638impl Visibility {
3255 pub fn pub_kw(&self) -> Option<PubKw> { 2639 pub fn pub_kw(&self) -> Option<PubKw> { support::token(&self.syntax) }
3256 support::token(&self.syntax) 2640 pub fn super_kw(&self) -> Option<SuperKw> { support::token(&self.syntax) }
3257 } 2641 pub fn self_kw(&self) -> Option<SelfKw> { support::token(&self.syntax) }
3258 pub fn super_kw(&self) -> Option<SuperKw> { 2642 pub fn crate_kw(&self) -> Option<CrateKw> { support::token(&self.syntax) }
3259 support::token(&self.syntax)
3260 }
3261 pub fn self_kw(&self) -> Option<SelfKw> {
3262 support::token(&self.syntax)
3263 }
3264 pub fn crate_kw(&self) -> Option<CrateKw> {
3265 support::token(&self.syntax)
3266 }
3267} 2643}
3268#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2644#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3269pub struct Name { 2645pub struct Name {
@@ -3288,14 +2664,10 @@ impl AstNode for Name {
3288 None 2664 None
3289 } 2665 }
3290 } 2666 }
3291 fn syntax(&self) -> &SyntaxNode { 2667 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3292 &self.syntax
3293 }
3294} 2668}
3295impl Name { 2669impl Name {
3296 pub fn ident(&self) -> Option<Ident> { 2670 pub fn ident(&self) -> Option<Ident> { support::token(&self.syntax) }
3297 support::token(&self.syntax)
3298 }
3299} 2671}
3300#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2672#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3301pub struct NameRef { 2673pub struct NameRef {
@@ -3320,14 +2692,10 @@ impl AstNode for NameRef {
3320 None 2692 None
3321 } 2693 }
3322 } 2694 }
3323 fn syntax(&self) -> &SyntaxNode { 2695 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3324 &self.syntax
3325 }
3326} 2696}
3327impl NameRef { 2697impl NameRef {
3328 pub fn name_ref_token(&self) -> Option<NameRefToken> { 2698 pub fn name_ref_token(&self) -> Option<NameRefToken> { support::token(&self.syntax) }
3329 support::token(&self.syntax)
3330 }
3331} 2699}
3332#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2700#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3333pub struct MacroCall { 2701pub struct MacroCall {
@@ -3352,26 +2720,16 @@ impl AstNode for MacroCall {
3352 None 2720 None
3353 } 2721 }
3354 } 2722 }
3355 fn syntax(&self) -> &SyntaxNode { 2723 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3356 &self.syntax
3357 }
3358} 2724}
3359impl ast::NameOwner for MacroCall {} 2725impl ast::NameOwner for MacroCall {}
3360impl ast::AttrsOwner for MacroCall {} 2726impl ast::AttrsOwner for MacroCall {}
3361impl ast::DocCommentsOwner for MacroCall {} 2727impl ast::DocCommentsOwner for MacroCall {}
3362impl MacroCall { 2728impl MacroCall {
3363 pub fn path(&self) -> Option<Path> { 2729 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
3364 support::child(&self.syntax) 2730 pub fn excl(&self) -> Option<Excl> { support::token(&self.syntax) }
3365 } 2731 pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
3366 pub fn excl(&self) -> Option<Excl> { 2732 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) }
3367 support::token(&self.syntax)
3368 }
3369 pub fn token_tree(&self) -> Option<TokenTree> {
3370 support::child(&self.syntax)
3371 }
3372 pub fn semi(&self) -> Option<Semi> {
3373 support::token(&self.syntax)
3374 }
3375} 2733}
3376#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2734#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3377pub struct Attr { 2735pub struct Attr {
@@ -3396,32 +2754,16 @@ impl AstNode for Attr {
3396 None 2754 None
3397 } 2755 }
3398 } 2756 }
3399 fn syntax(&self) -> &SyntaxNode { 2757 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3400 &self.syntax
3401 }
3402} 2758}
3403impl Attr { 2759impl Attr {
3404 pub fn pound(&self) -> Option<Pound> { 2760 pub fn pound(&self) -> Option<Pound> { support::token(&self.syntax) }
3405 support::token(&self.syntax) 2761 pub fn excl(&self) -> Option<Excl> { support::token(&self.syntax) }
3406 } 2762 pub fn l_brack(&self) -> Option<LBrack> { support::token(&self.syntax) }
3407 pub fn excl(&self) -> Option<Excl> { 2763 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
3408 support::token(&self.syntax) 2764 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) }
3409 } 2765 pub fn input(&self) -> Option<AttrInput> { support::child(&self.syntax) }
3410 pub fn l_brack(&self) -> Option<LBrack> { 2766 pub fn r_brack(&self) -> Option<RBrack> { support::token(&self.syntax) }
3411 support::token(&self.syntax)
3412 }
3413 pub fn path(&self) -> Option<Path> {
3414 support::child(&self.syntax)
3415 }
3416 pub fn eq(&self) -> Option<Eq> {
3417 support::token(&self.syntax)
3418 }
3419 pub fn input(&self) -> Option<AttrInput> {
3420 support::child(&self.syntax)
3421 }
3422 pub fn r_brack(&self) -> Option<RBrack> {
3423 support::token(&self.syntax)
3424 }
3425} 2767}
3426#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2768#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3427pub struct TokenTree { 2769pub struct TokenTree {
@@ -3446,9 +2788,7 @@ impl AstNode for TokenTree {
3446 None 2788 None
3447 } 2789 }
3448 } 2790 }
3449 fn syntax(&self) -> &SyntaxNode { 2791 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3450 &self.syntax
3451 }
3452} 2792}
3453impl TokenTree {} 2793impl TokenTree {}
3454#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2794#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -3474,29 +2814,15 @@ impl AstNode for TypeParamList {
3474 None 2814 None
3475 } 2815 }
3476 } 2816 }
3477 fn syntax(&self) -> &SyntaxNode { 2817 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3478 &self.syntax
3479 }
3480} 2818}
3481impl TypeParamList { 2819impl TypeParamList {
3482 pub fn l_angle(&self) -> Option<LAngle> { 2820 pub fn l_angle(&self) -> Option<LAngle> { support::token(&self.syntax) }
3483 support::token(&self.syntax) 2821 pub fn generic_params(&self) -> AstChildren<GenericParam> { support::children(&self.syntax) }
3484 } 2822 pub fn type_params(&self) -> AstChildren<TypeParam> { support::children(&self.syntax) }
3485 pub fn generic_params(&self) -> AstChildren<GenericParam> { 2823 pub fn lifetime_params(&self) -> AstChildren<LifetimeParam> { support::children(&self.syntax) }
3486 support::children(&self.syntax) 2824 pub fn const_params(&self) -> AstChildren<ConstParam> { support::children(&self.syntax) }
3487 } 2825 pub fn r_angle(&self) -> Option<RAngle> { support::token(&self.syntax) }
3488 pub fn type_params(&self) -> AstChildren<TypeParam> {
3489 support::children(&self.syntax)
3490 }
3491 pub fn lifetime_params(&self) -> AstChildren<LifetimeParam> {
3492 support::children(&self.syntax)
3493 }
3494 pub fn const_params(&self) -> AstChildren<ConstParam> {
3495 support::children(&self.syntax)
3496 }
3497 pub fn r_angle(&self) -> Option<RAngle> {
3498 support::token(&self.syntax)
3499 }
3500} 2826}
3501#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2827#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3502pub struct TypeParam { 2828pub struct TypeParam {
@@ -3521,20 +2847,14 @@ impl AstNode for TypeParam {
3521 None 2847 None
3522 } 2848 }
3523 } 2849 }
3524 fn syntax(&self) -> &SyntaxNode { 2850 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3525 &self.syntax
3526 }
3527} 2851}
3528impl ast::NameOwner for TypeParam {} 2852impl ast::NameOwner for TypeParam {}
3529impl ast::AttrsOwner for TypeParam {} 2853impl ast::AttrsOwner for TypeParam {}
3530impl ast::TypeBoundsOwner for TypeParam {} 2854impl ast::TypeBoundsOwner for TypeParam {}
3531impl TypeParam { 2855impl TypeParam {
3532 pub fn eq(&self) -> Option<Eq> { 2856 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) }
3533 support::token(&self.syntax) 2857 pub fn default_type(&self) -> Option<TypeRef> { support::child(&self.syntax) }
3534 }
3535 pub fn default_type(&self) -> Option<TypeRef> {
3536 support::child(&self.syntax)
3537 }
3538} 2858}
3539#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2859#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3540pub struct ConstParam { 2860pub struct ConstParam {
@@ -3559,20 +2879,14 @@ impl AstNode for ConstParam {
3559 None 2879 None
3560 } 2880 }
3561 } 2881 }
3562 fn syntax(&self) -> &SyntaxNode { 2882 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3563 &self.syntax
3564 }
3565} 2883}
3566impl ast::NameOwner for ConstParam {} 2884impl ast::NameOwner for ConstParam {}
3567impl ast::AttrsOwner for ConstParam {} 2885impl ast::AttrsOwner for ConstParam {}
3568impl ast::TypeAscriptionOwner for ConstParam {} 2886impl ast::TypeAscriptionOwner for ConstParam {}
3569impl ConstParam { 2887impl ConstParam {
3570 pub fn eq(&self) -> Option<Eq> { 2888 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) }
3571 support::token(&self.syntax) 2889 pub fn default_val(&self) -> Option<Expr> { support::child(&self.syntax) }
3572 }
3573 pub fn default_val(&self) -> Option<Expr> {
3574 support::child(&self.syntax)
3575 }
3576} 2890}
3577#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2891#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3578pub struct LifetimeParam { 2892pub struct LifetimeParam {
@@ -3597,15 +2911,11 @@ impl AstNode for LifetimeParam {
3597 None 2911 None
3598 } 2912 }
3599 } 2913 }
3600 fn syntax(&self) -> &SyntaxNode { 2914 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3601 &self.syntax
3602 }
3603} 2915}
3604impl ast::AttrsOwner for LifetimeParam {} 2916impl ast::AttrsOwner for LifetimeParam {}
3605impl LifetimeParam { 2917impl LifetimeParam {
3606 pub fn lifetime(&self) -> Option<Lifetime> { 2918 pub fn lifetime(&self) -> Option<Lifetime> { support::token(&self.syntax) }
3607 support::token(&self.syntax)
3608 }
3609} 2919}
3610#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2920#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3611pub struct TypeBound { 2921pub struct TypeBound {
@@ -3630,20 +2940,12 @@ impl AstNode for TypeBound {
3630 None 2940 None
3631 } 2941 }
3632 } 2942 }
3633 fn syntax(&self) -> &SyntaxNode { 2943 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3634 &self.syntax
3635 }
3636} 2944}
3637impl TypeBound { 2945impl TypeBound {
3638 pub fn lifetime(&self) -> Option<Lifetime> { 2946 pub fn lifetime(&self) -> Option<Lifetime> { support::token(&self.syntax) }
3639 support::token(&self.syntax) 2947 pub fn const_kw(&self) -> Option<ConstKw> { support::token(&self.syntax) }
3640 } 2948 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
3641 pub fn const_kw(&self) -> Option<ConstKw> {
3642 support::token(&self.syntax)
3643 }
3644 pub fn type_ref(&self) -> Option<TypeRef> {
3645 support::child(&self.syntax)
3646 }
3647} 2949}
3648#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2950#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3649pub struct TypeBoundList { 2951pub struct TypeBoundList {
@@ -3668,14 +2970,10 @@ impl AstNode for TypeBoundList {
3668 None 2970 None
3669 } 2971 }
3670 } 2972 }
3671 fn syntax(&self) -> &SyntaxNode { 2973 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3672 &self.syntax
3673 }
3674} 2974}
3675impl TypeBoundList { 2975impl TypeBoundList {
3676 pub fn bounds(&self) -> AstChildren<TypeBound> { 2976 pub fn bounds(&self) -> AstChildren<TypeBound> { support::children(&self.syntax) }
3677 support::children(&self.syntax)
3678 }
3679} 2977}
3680#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2978#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3681pub struct WherePred { 2979pub struct WherePred {
@@ -3700,18 +2998,12 @@ impl AstNode for WherePred {
3700 None 2998 None
3701 } 2999 }
3702 } 3000 }
3703 fn syntax(&self) -> &SyntaxNode { 3001 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3704 &self.syntax
3705 }
3706} 3002}
3707impl ast::TypeBoundsOwner for WherePred {} 3003impl ast::TypeBoundsOwner for WherePred {}
3708impl WherePred { 3004impl WherePred {
3709 pub fn lifetime(&self) -> Option<Lifetime> { 3005 pub fn lifetime(&self) -> Option<Lifetime> { support::token(&self.syntax) }
3710 support::token(&self.syntax) 3006 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
3711 }
3712 pub fn type_ref(&self) -> Option<TypeRef> {
3713 support::child(&self.syntax)
3714 }
3715} 3007}
3716#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3008#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3717pub struct WhereClause { 3009pub struct WhereClause {
@@ -3736,17 +3028,11 @@ impl AstNode for WhereClause {
3736 None 3028 None
3737 } 3029 }
3738 } 3030 }
3739 fn syntax(&self) -> &SyntaxNode { 3031 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3740 &self.syntax
3741 }
3742} 3032}
3743impl WhereClause { 3033impl WhereClause {
3744 pub fn where_kw(&self) -> Option<WhereKw> { 3034 pub fn where_kw(&self) -> Option<WhereKw> { support::token(&self.syntax) }
3745 support::token(&self.syntax) 3035 pub fn predicates(&self) -> AstChildren<WherePred> { support::children(&self.syntax) }
3746 }
3747 pub fn predicates(&self) -> AstChildren<WherePred> {
3748 support::children(&self.syntax)
3749 }
3750} 3036}
3751#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3037#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3752pub struct Abi { 3038pub struct Abi {
@@ -3771,14 +3057,10 @@ impl AstNode for Abi {
3771 None 3057 None
3772 } 3058 }
3773 } 3059 }
3774 fn syntax(&self) -> &SyntaxNode { 3060 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3775 &self.syntax
3776 }
3777} 3061}
3778impl Abi { 3062impl Abi {
3779 pub fn string(&self) -> Option<String> { 3063 pub fn string(&self) -> Option<String> { support::token(&self.syntax) }
3780 support::token(&self.syntax)
3781 }
3782} 3064}
3783#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3065#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3784pub struct ExprStmt { 3066pub struct ExprStmt {
@@ -3803,18 +3085,12 @@ impl AstNode for ExprStmt {
3803 None 3085 None
3804 } 3086 }
3805 } 3087 }
3806 fn syntax(&self) -> &SyntaxNode { 3088 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3807 &self.syntax
3808 }
3809} 3089}
3810impl ast::AttrsOwner for ExprStmt {} 3090impl ast::AttrsOwner for ExprStmt {}
3811impl ExprStmt { 3091impl ExprStmt {
3812 pub fn expr(&self) -> Option<Expr> { 3092 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
3813 support::child(&self.syntax) 3093 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) }
3814 }
3815 pub fn semi(&self) -> Option<Semi> {
3816 support::token(&self.syntax)
3817 }
3818} 3094}
3819#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3095#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3820pub struct LetStmt { 3096pub struct LetStmt {
@@ -3839,25 +3115,15 @@ impl AstNode for LetStmt {
3839 None 3115 None
3840 } 3116 }
3841 } 3117 }
3842 fn syntax(&self) -> &SyntaxNode { 3118 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3843 &self.syntax
3844 }
3845} 3119}
3846impl ast::AttrsOwner for LetStmt {} 3120impl ast::AttrsOwner for LetStmt {}
3847impl ast::TypeAscriptionOwner for LetStmt {} 3121impl ast::TypeAscriptionOwner for LetStmt {}
3848impl LetStmt { 3122impl LetStmt {
3849 pub fn let_kw(&self) -> Option<LetKw> { 3123 pub fn let_kw(&self) -> Option<LetKw> { support::token(&self.syntax) }
3850 support::token(&self.syntax) 3124 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
3851 } 3125 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) }
3852 pub fn pat(&self) -> Option<Pat> { 3126 pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) }
3853 support::child(&self.syntax)
3854 }
3855 pub fn eq(&self) -> Option<Eq> {
3856 support::token(&self.syntax)
3857 }
3858 pub fn initializer(&self) -> Option<Expr> {
3859 support::child(&self.syntax)
3860 }
3861} 3127}
3862#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3128#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3863pub struct Condition { 3129pub struct Condition {
@@ -3882,23 +3148,13 @@ impl AstNode for Condition {
3882 None 3148 None
3883 } 3149 }
3884 } 3150 }
3885 fn syntax(&self) -> &SyntaxNode { 3151 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3886 &self.syntax
3887 }
3888} 3152}
3889impl Condition { 3153impl Condition {
3890 pub fn let_kw(&self) -> Option<LetKw> { 3154 pub fn let_kw(&self) -> Option<LetKw> { support::token(&self.syntax) }
3891 support::token(&self.syntax) 3155 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
3892 } 3156 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) }
3893 pub fn pat(&self) -> Option<Pat> { 3157 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
3894 support::child(&self.syntax)
3895 }
3896 pub fn eq(&self) -> Option<Eq> {
3897 support::token(&self.syntax)
3898 }
3899 pub fn expr(&self) -> Option<Expr> {
3900 support::child(&self.syntax)
3901 }
3902} 3158}
3903#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3159#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3904pub struct Block { 3160pub struct Block {
@@ -3923,25 +3179,15 @@ impl AstNode for Block {
3923 None 3179 None
3924 } 3180 }
3925 } 3181 }
3926 fn syntax(&self) -> &SyntaxNode { 3182 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3927 &self.syntax
3928 }
3929} 3183}
3930impl ast::AttrsOwner for Block {} 3184impl ast::AttrsOwner for Block {}
3931impl ast::ModuleItemOwner for Block {} 3185impl ast::ModuleItemOwner for Block {}
3932impl Block { 3186impl Block {
3933 pub fn l_curly(&self) -> Option<LCurly> { 3187 pub fn l_curly(&self) -> Option<LCurly> { support::token(&self.syntax) }
3934 support::token(&self.syntax) 3188 pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) }
3935 } 3189 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
3936 pub fn statements(&self) -> AstChildren<Stmt> { 3190 pub fn r_curly(&self) -> Option<RCurly> { support::token(&self.syntax) }
3937 support::children(&self.syntax)
3938 }
3939 pub fn expr(&self) -> Option<Expr> {
3940 support::child(&self.syntax)
3941 }
3942 pub fn r_curly(&self) -> Option<RCurly> {
3943 support::token(&self.syntax)
3944 }
3945} 3191}
3946#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3192#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3947pub struct ParamList { 3193pub struct ParamList {
@@ -3966,23 +3212,13 @@ impl AstNode for ParamList {
3966 None 3212 None
3967 } 3213 }
3968 } 3214 }
3969 fn syntax(&self) -> &SyntaxNode { 3215 fn syntax(&self) -> &SyntaxNode { &self.syntax }
3970 &self.syntax
3971 }
3972} 3216}
3973impl ParamList { 3217impl ParamList {
3974 pub fn l_paren(&self) -> Option<LParen> { 3218 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) }
3975 support::token(&self.syntax) 3219 pub fn self_param(&self) -> Option<SelfParam> { support::child(&self.syntax) }
3976 } 3220 pub fn params(&self) -> AstChildren<Param> { support::children(&self.syntax) }
3977 pub fn self_param(&self) -> Option<SelfParam> { 3221 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) }
3978 support::child(&self.syntax)
3979 }
3980 pub fn params(&self) -> AstChildren<Param> {
3981 support::children(&self.syntax)
3982 }
3983 pub fn r_paren(&self) -> Option<RParen> {
3984 support::token(&self.syntax)
3985 }
3986} 3222}
3987#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3223#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3988pub struct SelfParam { 3224pub struct SelfParam {
@@ -4007,22 +3243,14 @@ impl AstNode for SelfParam {
4007 None 3243 None
4008 } 3244 }
4009 } 3245 }
4010 fn syntax(&self) -> &SyntaxNode { 3246 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4011 &self.syntax
4012 }
4013} 3247}
4014impl ast::TypeAscriptionOwner for SelfParam {} 3248impl ast::TypeAscriptionOwner for SelfParam {}
4015impl ast::AttrsOwner for SelfParam {} 3249impl ast::AttrsOwner for SelfParam {}
4016impl SelfParam { 3250impl SelfParam {
4017 pub fn amp(&self) -> Option<Amp> { 3251 pub fn amp(&self) -> Option<Amp> { support::token(&self.syntax) }
4018 support::token(&self.syntax) 3252 pub fn lifetime(&self) -> Option<Lifetime> { support::token(&self.syntax) }
4019 } 3253 pub fn self_kw(&self) -> Option<SelfKw> { support::token(&self.syntax) }
4020 pub fn lifetime(&self) -> Option<Lifetime> {
4021 support::token(&self.syntax)
4022 }
4023 pub fn self_kw(&self) -> Option<SelfKw> {
4024 support::token(&self.syntax)
4025 }
4026} 3254}
4027#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3255#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4028pub struct Param { 3256pub struct Param {
@@ -4047,19 +3275,13 @@ impl AstNode for Param {
4047 None 3275 None
4048 } 3276 }
4049 } 3277 }
4050 fn syntax(&self) -> &SyntaxNode { 3278 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4051 &self.syntax
4052 }
4053} 3279}
4054impl ast::TypeAscriptionOwner for Param {} 3280impl ast::TypeAscriptionOwner for Param {}
4055impl ast::AttrsOwner for Param {} 3281impl ast::AttrsOwner for Param {}
4056impl Param { 3282impl Param {
4057 pub fn pat(&self) -> Option<Pat> { 3283 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
4058 support::child(&self.syntax) 3284 pub fn dotdotdot(&self) -> Option<Dotdotdot> { support::token(&self.syntax) }
4059 }
4060 pub fn dotdotdot(&self) -> Option<Dotdotdot> {
4061 support::token(&self.syntax)
4062 }
4063} 3285}
4064#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3286#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4065pub struct UseItem { 3287pub struct UseItem {
@@ -4084,19 +3306,13 @@ impl AstNode for UseItem {
4084 None 3306 None
4085 } 3307 }
4086 } 3308 }
4087 fn syntax(&self) -> &SyntaxNode { 3309 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4088 &self.syntax
4089 }
4090} 3310}
4091impl ast::AttrsOwner for UseItem {} 3311impl ast::AttrsOwner for UseItem {}
4092impl ast::VisibilityOwner for UseItem {} 3312impl ast::VisibilityOwner for UseItem {}
4093impl UseItem { 3313impl UseItem {
4094 pub fn use_kw(&self) -> Option<UseKw> { 3314 pub fn use_kw(&self) -> Option<UseKw> { support::token(&self.syntax) }
4095 support::token(&self.syntax) 3315 pub fn use_tree(&self) -> Option<UseTree> { support::child(&self.syntax) }
4096 }
4097 pub fn use_tree(&self) -> Option<UseTree> {
4098 support::child(&self.syntax)
4099 }
4100} 3316}
4101#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3317#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4102pub struct UseTree { 3318pub struct UseTree {
@@ -4121,23 +3337,13 @@ impl AstNode for UseTree {
4121 None 3337 None
4122 } 3338 }
4123 } 3339 }
4124 fn syntax(&self) -> &SyntaxNode { 3340 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4125 &self.syntax
4126 }
4127} 3341}
4128impl UseTree { 3342impl UseTree {
4129 pub fn path(&self) -> Option<Path> { 3343 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
4130 support::child(&self.syntax) 3344 pub fn star(&self) -> Option<Star> { support::token(&self.syntax) }
4131 } 3345 pub fn use_tree_list(&self) -> Option<UseTreeList> { support::child(&self.syntax) }
4132 pub fn star(&self) -> Option<Star> { 3346 pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) }
4133 support::token(&self.syntax)
4134 }
4135 pub fn use_tree_list(&self) -> Option<UseTreeList> {
4136 support::child(&self.syntax)
4137 }
4138 pub fn alias(&self) -> Option<Alias> {
4139 support::child(&self.syntax)
4140 }
4141} 3347}
4142#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3348#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4143pub struct Alias { 3349pub struct Alias {
@@ -4162,15 +3368,11 @@ impl AstNode for Alias {
4162 None 3368 None
4163 } 3369 }
4164 } 3370 }
4165 fn syntax(&self) -> &SyntaxNode { 3371 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4166 &self.syntax
4167 }
4168} 3372}
4169impl ast::NameOwner for Alias {} 3373impl ast::NameOwner for Alias {}
4170impl Alias { 3374impl Alias {
4171 pub fn as_kw(&self) -> Option<AsKw> { 3375 pub fn as_kw(&self) -> Option<AsKw> { support::token(&self.syntax) }
4172 support::token(&self.syntax)
4173 }
4174} 3376}
4175#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3377#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4176pub struct UseTreeList { 3378pub struct UseTreeList {
@@ -4195,20 +3397,12 @@ impl AstNode for UseTreeList {
4195 None 3397 None
4196 } 3398 }
4197 } 3399 }
4198 fn syntax(&self) -> &SyntaxNode { 3400 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4199 &self.syntax
4200 }
4201} 3401}
4202impl UseTreeList { 3402impl UseTreeList {
4203 pub fn l_curly(&self) -> Option<LCurly> { 3403 pub fn l_curly(&self) -> Option<LCurly> { support::token(&self.syntax) }
4204 support::token(&self.syntax) 3404 pub fn use_trees(&self) -> AstChildren<UseTree> { support::children(&self.syntax) }
4205 } 3405 pub fn r_curly(&self) -> Option<RCurly> { support::token(&self.syntax) }
4206 pub fn use_trees(&self) -> AstChildren<UseTree> {
4207 support::children(&self.syntax)
4208 }
4209 pub fn r_curly(&self) -> Option<RCurly> {
4210 support::token(&self.syntax)
4211 }
4212} 3406}
4213#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3407#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4214pub struct ExternCrateItem { 3408pub struct ExternCrateItem {
@@ -4233,25 +3427,15 @@ impl AstNode for ExternCrateItem {
4233 None 3427 None
4234 } 3428 }
4235 } 3429 }
4236 fn syntax(&self) -> &SyntaxNode { 3430 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4237 &self.syntax
4238 }
4239} 3431}
4240impl ast::AttrsOwner for ExternCrateItem {} 3432impl ast::AttrsOwner for ExternCrateItem {}
4241impl ast::VisibilityOwner for ExternCrateItem {} 3433impl ast::VisibilityOwner for ExternCrateItem {}
4242impl ExternCrateItem { 3434impl ExternCrateItem {
4243 pub fn extern_kw(&self) -> Option<ExternKw> { 3435 pub fn extern_kw(&self) -> Option<ExternKw> { support::token(&self.syntax) }
4244 support::token(&self.syntax) 3436 pub fn crate_kw(&self) -> Option<CrateKw> { support::token(&self.syntax) }
4245 } 3437 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
4246 pub fn crate_kw(&self) -> Option<CrateKw> { 3438 pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) }
4247 support::token(&self.syntax)
4248 }
4249 pub fn name_ref(&self) -> Option<NameRef> {
4250 support::child(&self.syntax)
4251 }
4252 pub fn alias(&self) -> Option<Alias> {
4253 support::child(&self.syntax)
4254 }
4255} 3439}
4256#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3440#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4257pub struct ArgList { 3441pub struct ArgList {
@@ -4276,20 +3460,12 @@ impl AstNode for ArgList {
4276 None 3460 None
4277 } 3461 }
4278 } 3462 }
4279 fn syntax(&self) -> &SyntaxNode { 3463 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4280 &self.syntax
4281 }
4282} 3464}
4283impl ArgList { 3465impl ArgList {
4284 pub fn l_paren(&self) -> Option<LParen> { 3466 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) }
4285 support::token(&self.syntax) 3467 pub fn args(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
4286 } 3468 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) }
4287 pub fn args(&self) -> AstChildren<Expr> {
4288 support::children(&self.syntax)
4289 }
4290 pub fn r_paren(&self) -> Option<RParen> {
4291 support::token(&self.syntax)
4292 }
4293} 3469}
4294#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3470#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4295pub struct Path { 3471pub struct Path {
@@ -4314,17 +3490,11 @@ impl AstNode for Path {
4314 None 3490 None
4315 } 3491 }
4316 } 3492 }
4317 fn syntax(&self) -> &SyntaxNode { 3493 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4318 &self.syntax
4319 }
4320} 3494}
4321impl Path { 3495impl Path {
4322 pub fn segment(&self) -> Option<PathSegment> { 3496 pub fn segment(&self) -> Option<PathSegment> { support::child(&self.syntax) }
4323 support::child(&self.syntax) 3497 pub fn qualifier(&self) -> Option<Path> { support::child(&self.syntax) }
4324 }
4325 pub fn qualifier(&self) -> Option<Path> {
4326 support::child(&self.syntax)
4327 }
4328} 3498}
4329#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3499#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4330pub struct PathSegment { 3500pub struct PathSegment {
@@ -4349,35 +3519,17 @@ impl AstNode for PathSegment {
4349 None 3519 None
4350 } 3520 }
4351 } 3521 }
4352 fn syntax(&self) -> &SyntaxNode { 3522 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4353 &self.syntax
4354 }
4355} 3523}
4356impl PathSegment { 3524impl PathSegment {
4357 pub fn coloncolon(&self) -> Option<Coloncolon> { 3525 pub fn coloncolon(&self) -> Option<Coloncolon> { support::token(&self.syntax) }
4358 support::token(&self.syntax) 3526 pub fn l_angle(&self) -> Option<LAngle> { support::token(&self.syntax) }
4359 } 3527 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
4360 pub fn l_angle(&self) -> Option<LAngle> { 3528 pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) }
4361 support::token(&self.syntax) 3529 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
4362 } 3530 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
4363 pub fn name_ref(&self) -> Option<NameRef> { 3531 pub fn path_type(&self) -> Option<PathType> { support::child(&self.syntax) }
4364 support::child(&self.syntax) 3532 pub fn r_angle(&self) -> Option<RAngle> { support::token(&self.syntax) }
4365 }
4366 pub fn type_arg_list(&self) -> Option<TypeArgList> {
4367 support::child(&self.syntax)
4368 }
4369 pub fn param_list(&self) -> Option<ParamList> {
4370 support::child(&self.syntax)
4371 }
4372 pub fn ret_type(&self) -> Option<RetType> {
4373 support::child(&self.syntax)
4374 }
4375 pub fn path_type(&self) -> Option<PathType> {
4376 support::child(&self.syntax)
4377 }
4378 pub fn r_angle(&self) -> Option<RAngle> {
4379 support::token(&self.syntax)
4380 }
4381} 3533}
4382#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3534#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4383pub struct TypeArgList { 3535pub struct TypeArgList {
@@ -4402,35 +3554,17 @@ impl AstNode for TypeArgList {
4402 None 3554 None
4403 } 3555 }
4404 } 3556 }
4405 fn syntax(&self) -> &SyntaxNode { 3557 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4406 &self.syntax
4407 }
4408} 3558}
4409impl TypeArgList { 3559impl TypeArgList {
4410 pub fn coloncolon(&self) -> Option<Coloncolon> { 3560 pub fn coloncolon(&self) -> Option<Coloncolon> { support::token(&self.syntax) }
4411 support::token(&self.syntax) 3561 pub fn l_angle(&self) -> Option<LAngle> { support::token(&self.syntax) }
4412 } 3562 pub fn generic_args(&self) -> AstChildren<GenericArg> { support::children(&self.syntax) }
4413 pub fn l_angle(&self) -> Option<LAngle> { 3563 pub fn type_args(&self) -> AstChildren<TypeArg> { support::children(&self.syntax) }
4414 support::token(&self.syntax) 3564 pub fn lifetime_args(&self) -> AstChildren<LifetimeArg> { support::children(&self.syntax) }
4415 } 3565 pub fn assoc_type_args(&self) -> AstChildren<AssocTypeArg> { support::children(&self.syntax) }
4416 pub fn generic_args(&self) -> AstChildren<GenericArg> { 3566 pub fn const_args(&self) -> AstChildren<ConstArg> { support::children(&self.syntax) }
4417 support::children(&self.syntax) 3567 pub fn r_angle(&self) -> Option<RAngle> { support::token(&self.syntax) }
4418 }
4419 pub fn type_args(&self) -> AstChildren<TypeArg> {
4420 support::children(&self.syntax)
4421 }
4422 pub fn lifetime_args(&self) -> AstChildren<LifetimeArg> {
4423 support::children(&self.syntax)
4424 }
4425 pub fn assoc_type_args(&self) -> AstChildren<AssocTypeArg> {
4426 support::children(&self.syntax)
4427 }
4428 pub fn const_args(&self) -> AstChildren<ConstArg> {
4429 support::children(&self.syntax)
4430 }
4431 pub fn r_angle(&self) -> Option<RAngle> {
4432 support::token(&self.syntax)
4433 }
4434} 3568}
4435#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3569#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4436pub struct TypeArg { 3570pub struct TypeArg {
@@ -4455,14 +3589,10 @@ impl AstNode for TypeArg {
4455 None 3589 None
4456 } 3590 }
4457 } 3591 }
4458 fn syntax(&self) -> &SyntaxNode { 3592 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4459 &self.syntax
4460 }
4461} 3593}
4462impl TypeArg { 3594impl TypeArg {
4463 pub fn type_ref(&self) -> Option<TypeRef> { 3595 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
4464 support::child(&self.syntax)
4465 }
4466} 3596}
4467#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3597#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4468pub struct AssocTypeArg { 3598pub struct AssocTypeArg {
@@ -4487,21 +3617,13 @@ impl AstNode for AssocTypeArg {
4487 None 3617 None
4488 } 3618 }
4489 } 3619 }
4490 fn syntax(&self) -> &SyntaxNode { 3620 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4491 &self.syntax
4492 }
4493} 3621}
4494impl ast::TypeBoundsOwner for AssocTypeArg {} 3622impl ast::TypeBoundsOwner for AssocTypeArg {}
4495impl AssocTypeArg { 3623impl AssocTypeArg {
4496 pub fn name_ref(&self) -> Option<NameRef> { 3624 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
4497 support::child(&self.syntax) 3625 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) }
4498 } 3626 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
4499 pub fn eq(&self) -> Option<Eq> {
4500 support::token(&self.syntax)
4501 }
4502 pub fn type_ref(&self) -> Option<TypeRef> {
4503 support::child(&self.syntax)
4504 }
4505} 3627}
4506#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3628#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4507pub struct LifetimeArg { 3629pub struct LifetimeArg {
@@ -4526,14 +3648,10 @@ impl AstNode for LifetimeArg {
4526 None 3648 None
4527 } 3649 }
4528 } 3650 }
4529 fn syntax(&self) -> &SyntaxNode { 3651 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4530 &self.syntax
4531 }
4532} 3652}
4533impl LifetimeArg { 3653impl LifetimeArg {
4534 pub fn lifetime(&self) -> Option<Lifetime> { 3654 pub fn lifetime(&self) -> Option<Lifetime> { support::token(&self.syntax) }
4535 support::token(&self.syntax)
4536 }
4537} 3655}
4538#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3656#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4539pub struct ConstArg { 3657pub struct ConstArg {
@@ -4558,20 +3676,12 @@ impl AstNode for ConstArg {
4558 None 3676 None
4559 } 3677 }
4560 } 3678 }
4561 fn syntax(&self) -> &SyntaxNode { 3679 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4562 &self.syntax
4563 }
4564} 3680}
4565impl ConstArg { 3681impl ConstArg {
4566 pub fn literal(&self) -> Option<Literal> { 3682 pub fn literal(&self) -> Option<Literal> { support::child(&self.syntax) }
4567 support::child(&self.syntax) 3683 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) }
4568 } 3684 pub fn block_expr(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
4569 pub fn eq(&self) -> Option<Eq> {
4570 support::token(&self.syntax)
4571 }
4572 pub fn block_expr(&self) -> Option<BlockExpr> {
4573 support::child(&self.syntax)
4574 }
4575} 3685}
4576#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3686#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4577pub struct MacroItems { 3687pub struct MacroItems {
@@ -4596,9 +3706,7 @@ impl AstNode for MacroItems {
4596 None 3706 None
4597 } 3707 }
4598 } 3708 }
4599 fn syntax(&self) -> &SyntaxNode { 3709 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4600 &self.syntax
4601 }
4602} 3710}
4603impl ast::ModuleItemOwner for MacroItems {} 3711impl ast::ModuleItemOwner for MacroItems {}
4604impl ast::FnDefOwner for MacroItems {} 3712impl ast::FnDefOwner for MacroItems {}
@@ -4626,17 +3734,11 @@ impl AstNode for MacroStmts {
4626 None 3734 None
4627 } 3735 }
4628 } 3736 }
4629 fn syntax(&self) -> &SyntaxNode { 3737 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4630 &self.syntax
4631 }
4632} 3738}
4633impl MacroStmts { 3739impl MacroStmts {
4634 pub fn statements(&self) -> AstChildren<Stmt> { 3740 pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) }
4635 support::children(&self.syntax) 3741 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
4636 }
4637 pub fn expr(&self) -> Option<Expr> {
4638 support::child(&self.syntax)
4639 }
4640} 3742}
4641#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3743#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4642pub struct ExternItemList { 3744pub struct ExternItemList {
@@ -4661,22 +3763,14 @@ impl AstNode for ExternItemList {
4661 None 3763 None
4662 } 3764 }
4663 } 3765 }
4664 fn syntax(&self) -> &SyntaxNode { 3766 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4665 &self.syntax
4666 }
4667} 3767}
4668impl ast::FnDefOwner for ExternItemList {} 3768impl ast::FnDefOwner for ExternItemList {}
4669impl ast::ModuleItemOwner for ExternItemList {} 3769impl ast::ModuleItemOwner for ExternItemList {}
4670impl ExternItemList { 3770impl ExternItemList {
4671 pub fn l_curly(&self) -> Option<LCurly> { 3771 pub fn l_curly(&self) -> Option<LCurly> { support::token(&self.syntax) }
4672 support::token(&self.syntax) 3772 pub fn extern_items(&self) -> AstChildren<ExternItem> { support::children(&self.syntax) }
4673 } 3773 pub fn r_curly(&self) -> Option<RCurly> { support::token(&self.syntax) }
4674 pub fn extern_items(&self) -> AstChildren<ExternItem> {
4675 support::children(&self.syntax)
4676 }
4677 pub fn r_curly(&self) -> Option<RCurly> {
4678 support::token(&self.syntax)
4679 }
4680} 3774}
4681#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3775#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4682pub struct ExternBlock { 3776pub struct ExternBlock {
@@ -4701,17 +3795,11 @@ impl AstNode for ExternBlock {
4701 None 3795 None
4702 } 3796 }
4703 } 3797 }
4704 fn syntax(&self) -> &SyntaxNode { 3798 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4705 &self.syntax
4706 }
4707} 3799}
4708impl ExternBlock { 3800impl ExternBlock {
4709 pub fn abi(&self) -> Option<Abi> { 3801 pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
4710 support::child(&self.syntax) 3802 pub fn extern_item_list(&self) -> Option<ExternItemList> { support::child(&self.syntax) }
4711 }
4712 pub fn extern_item_list(&self) -> Option<ExternItemList> {
4713 support::child(&self.syntax)
4714 }
4715} 3803}
4716#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3804#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4717pub struct MetaItem { 3805pub struct MetaItem {
@@ -4736,23 +3824,13 @@ impl AstNode for MetaItem {
4736 None 3824 None
4737 } 3825 }
4738 } 3826 }
4739 fn syntax(&self) -> &SyntaxNode { 3827 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4740 &self.syntax
4741 }
4742} 3828}
4743impl MetaItem { 3829impl MetaItem {
4744 pub fn path(&self) -> Option<Path> { 3830 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
4745 support::child(&self.syntax) 3831 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) }
4746 } 3832 pub fn attr_input(&self) -> Option<AttrInput> { support::child(&self.syntax) }
4747 pub fn eq(&self) -> Option<Eq> { 3833 pub fn nested_meta_items(&self) -> AstChildren<MetaItem> { support::children(&self.syntax) }
4748 support::token(&self.syntax)
4749 }
4750 pub fn attr_input(&self) -> Option<AttrInput> {
4751 support::child(&self.syntax)
4752 }
4753 pub fn nested_meta_items(&self) -> AstChildren<MetaItem> {
4754 support::children(&self.syntax)
4755 }
4756} 3834}
4757#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3835#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4758pub struct MacroDef { 3836pub struct MacroDef {
@@ -4777,17 +3855,11 @@ impl AstNode for MacroDef {
4777 None 3855 None
4778 } 3856 }
4779 } 3857 }
4780 fn syntax(&self) -> &SyntaxNode { 3858 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4781 &self.syntax
4782 }
4783} 3859}
4784impl MacroDef { 3860impl MacroDef {
4785 pub fn name(&self) -> Option<Name> { 3861 pub fn name(&self) -> Option<Name> { support::child(&self.syntax) }
4786 support::child(&self.syntax) 3862 pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
4787 }
4788 pub fn token_tree(&self) -> Option<TokenTree> {
4789 support::child(&self.syntax)
4790 }
4791} 3863}
4792#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3864#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4793pub enum NominalDef { 3865pub enum NominalDef {
@@ -4796,19 +3868,13 @@ pub enum NominalDef {
4796 UnionDef(UnionDef), 3868 UnionDef(UnionDef),
4797} 3869}
4798impl From<StructDef> for NominalDef { 3870impl From<StructDef> for NominalDef {
4799 fn from(node: StructDef) -> NominalDef { 3871 fn from(node: StructDef) -> NominalDef { NominalDef::StructDef(node) }
4800 NominalDef::StructDef(node)
4801 }
4802} 3872}
4803impl From<EnumDef> for NominalDef { 3873impl From<EnumDef> for NominalDef {
4804 fn from(node: EnumDef) -> NominalDef { 3874 fn from(node: EnumDef) -> NominalDef { NominalDef::EnumDef(node) }
4805 NominalDef::EnumDef(node)
4806 }
4807} 3875}
4808impl From<UnionDef> for NominalDef { 3876impl From<UnionDef> for NominalDef {
4809 fn from(node: UnionDef) -> NominalDef { 3877 fn from(node: UnionDef) -> NominalDef { NominalDef::UnionDef(node) }
4810 NominalDef::UnionDef(node)
4811 }
4812} 3878}
4813impl std::fmt::Display for NominalDef { 3879impl std::fmt::Display for NominalDef {
4814 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 3880 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -4849,19 +3915,13 @@ pub enum GenericParam {
4849 ConstParam(ConstParam), 3915 ConstParam(ConstParam),
4850} 3916}
4851impl From<LifetimeParam> for GenericParam { 3917impl From<LifetimeParam> for GenericParam {
4852 fn from(node: LifetimeParam) -> GenericParam { 3918 fn from(node: LifetimeParam) -> GenericParam { GenericParam::LifetimeParam(node) }
4853 GenericParam::LifetimeParam(node)
4854 }
4855} 3919}
4856impl From<TypeParam> for GenericParam { 3920impl From<TypeParam> for GenericParam {
4857 fn from(node: TypeParam) -> GenericParam { 3921 fn from(node: TypeParam) -> GenericParam { GenericParam::TypeParam(node) }
4858 GenericParam::TypeParam(node)
4859 }
4860} 3922}
4861impl From<ConstParam> for GenericParam { 3923impl From<ConstParam> for GenericParam {
4862 fn from(node: ConstParam) -> GenericParam { 3924 fn from(node: ConstParam) -> GenericParam { GenericParam::ConstParam(node) }
4863 GenericParam::ConstParam(node)
4864 }
4865} 3925}
4866impl std::fmt::Display for GenericParam { 3926impl std::fmt::Display for GenericParam {
4867 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 3927 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -4900,24 +3960,16 @@ pub enum GenericArg {
4900 AssocTypeArg(AssocTypeArg), 3960 AssocTypeArg(AssocTypeArg),
4901} 3961}
4902impl From<LifetimeArg> for GenericArg { 3962impl From<LifetimeArg> for GenericArg {
4903 fn from(node: LifetimeArg) -> GenericArg { 3963 fn from(node: LifetimeArg) -> GenericArg { GenericArg::LifetimeArg(node) }
4904 GenericArg::LifetimeArg(node)
4905 }
4906} 3964}
4907impl From<TypeArg> for GenericArg { 3965impl From<TypeArg> for GenericArg {
4908 fn from(node: TypeArg) -> GenericArg { 3966 fn from(node: TypeArg) -> GenericArg { GenericArg::TypeArg(node) }
4909 GenericArg::TypeArg(node)
4910 }
4911} 3967}
4912impl From<ConstArg> for GenericArg { 3968impl From<ConstArg> for GenericArg {
4913 fn from(node: ConstArg) -> GenericArg { 3969 fn from(node: ConstArg) -> GenericArg { GenericArg::ConstArg(node) }
4914 GenericArg::ConstArg(node)
4915 }
4916} 3970}
4917impl From<AssocTypeArg> for GenericArg { 3971impl From<AssocTypeArg> for GenericArg {
4918 fn from(node: AssocTypeArg) -> GenericArg { 3972 fn from(node: AssocTypeArg) -> GenericArg { GenericArg::AssocTypeArg(node) }
4919 GenericArg::AssocTypeArg(node)
4920 }
4921} 3973}
4922impl std::fmt::Display for GenericArg { 3974impl std::fmt::Display for GenericArg {
4923 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 3975 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -4967,69 +4019,43 @@ pub enum TypeRef {
4967 DynTraitType(DynTraitType), 4019 DynTraitType(DynTraitType),
4968} 4020}
4969impl From<ParenType> for TypeRef { 4021impl From<ParenType> for TypeRef {
4970 fn from(node: ParenType) -> TypeRef { 4022 fn from(node: ParenType) -> TypeRef { TypeRef::ParenType(node) }
4971 TypeRef::ParenType(node)
4972 }
4973} 4023}
4974impl From<TupleType> for TypeRef { 4024impl From<TupleType> for TypeRef {
4975 fn from(node: TupleType) -> TypeRef { 4025 fn from(node: TupleType) -> TypeRef { TypeRef::TupleType(node) }
4976 TypeRef::TupleType(node)
4977 }
4978} 4026}
4979impl From<NeverType> for TypeRef { 4027impl From<NeverType> for TypeRef {
4980 fn from(node: NeverType) -> TypeRef { 4028 fn from(node: NeverType) -> TypeRef { TypeRef::NeverType(node) }
4981 TypeRef::NeverType(node)
4982 }
4983} 4029}
4984impl From<PathType> for TypeRef { 4030impl From<PathType> for TypeRef {
4985 fn from(node: PathType) -> TypeRef { 4031 fn from(node: PathType) -> TypeRef { TypeRef::PathType(node) }
4986 TypeRef::PathType(node)
4987 }
4988} 4032}
4989impl From<PointerType> for TypeRef { 4033impl From<PointerType> for TypeRef {
4990 fn from(node: PointerType) -> TypeRef { 4034 fn from(node: PointerType) -> TypeRef { TypeRef::PointerType(node) }
4991 TypeRef::PointerType(node)
4992 }
4993} 4035}
4994impl From<ArrayType> for TypeRef { 4036impl From<ArrayType> for TypeRef {
4995 fn from(node: ArrayType) -> TypeRef { 4037 fn from(node: ArrayType) -> TypeRef { TypeRef::ArrayType(node) }
4996 TypeRef::ArrayType(node)
4997 }
4998} 4038}
4999impl From<SliceType> for TypeRef { 4039impl From<SliceType> for TypeRef {
5000 fn from(node: SliceType) -> TypeRef { 4040 fn from(node: SliceType) -> TypeRef { TypeRef::SliceType(node) }
5001 TypeRef::SliceType(node)
5002 }
5003} 4041}
5004impl From<ReferenceType> for TypeRef { 4042impl From<ReferenceType> for TypeRef {
5005 fn from(node: ReferenceType) -> TypeRef { 4043 fn from(node: ReferenceType) -> TypeRef { TypeRef::ReferenceType(node) }
5006 TypeRef::ReferenceType(node)
5007 }
5008} 4044}
5009impl From<PlaceholderType> for TypeRef { 4045impl From<PlaceholderType> for TypeRef {
5010 fn from(node: PlaceholderType) -> TypeRef { 4046 fn from(node: PlaceholderType) -> TypeRef { TypeRef::PlaceholderType(node) }
5011 TypeRef::PlaceholderType(node)
5012 }
5013} 4047}
5014impl From<FnPointerType> for TypeRef { 4048impl From<FnPointerType> for TypeRef {
5015 fn from(node: FnPointerType) -> TypeRef { 4049 fn from(node: FnPointerType) -> TypeRef { TypeRef::FnPointerType(node) }
5016 TypeRef::FnPointerType(node)
5017 }
5018} 4050}
5019impl From<ForType> for TypeRef { 4051impl From<ForType> for TypeRef {
5020 fn from(node: ForType) -> TypeRef { 4052 fn from(node: ForType) -> TypeRef { TypeRef::ForType(node) }
5021 TypeRef::ForType(node)
5022 }
5023} 4053}
5024impl From<ImplTraitType> for TypeRef { 4054impl From<ImplTraitType> for TypeRef {
5025 fn from(node: ImplTraitType) -> TypeRef { 4055 fn from(node: ImplTraitType) -> TypeRef { TypeRef::ImplTraitType(node) }
5026 TypeRef::ImplTraitType(node)
5027 }
5028} 4056}
5029impl From<DynTraitType> for TypeRef { 4057impl From<DynTraitType> for TypeRef {
5030 fn from(node: DynTraitType) -> TypeRef { 4058 fn from(node: DynTraitType) -> TypeRef { TypeRef::DynTraitType(node) }
5031 TypeRef::DynTraitType(node)
5032 }
5033} 4059}
5034impl std::fmt::Display for TypeRef { 4060impl std::fmt::Display for TypeRef {
5035 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 4061 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -5100,74 +4126,46 @@ pub enum ModuleItem {
5100 ExternBlock(ExternBlock), 4126 ExternBlock(ExternBlock),
5101} 4127}
5102impl From<StructDef> for ModuleItem { 4128impl From<StructDef> for ModuleItem {
5103 fn from(node: StructDef) -> ModuleItem { 4129 fn from(node: StructDef) -> ModuleItem { ModuleItem::StructDef(node) }
5104 ModuleItem::StructDef(node)
5105 }
5106} 4130}
5107impl From<UnionDef> for ModuleItem { 4131impl From<UnionDef> for ModuleItem {
5108 fn from(node: UnionDef) -> ModuleItem { 4132 fn from(node: UnionDef) -> ModuleItem { ModuleItem::UnionDef(node) }
5109 ModuleItem::UnionDef(node)
5110 }
5111} 4133}
5112impl From<EnumDef> for ModuleItem { 4134impl From<EnumDef> for ModuleItem {
5113 fn from(node: EnumDef) -> ModuleItem { 4135 fn from(node: EnumDef) -> ModuleItem { ModuleItem::EnumDef(node) }
5114 ModuleItem::EnumDef(node)
5115 }
5116} 4136}
5117impl From<FnDef> for ModuleItem { 4137impl From<FnDef> for ModuleItem {
5118 fn from(node: FnDef) -> ModuleItem { 4138 fn from(node: FnDef) -> ModuleItem { ModuleItem::FnDef(node) }
5119 ModuleItem::FnDef(node)
5120 }
5121} 4139}
5122impl From<TraitDef> for ModuleItem { 4140impl From<TraitDef> for ModuleItem {
5123 fn from(node: TraitDef) -> ModuleItem { 4141 fn from(node: TraitDef) -> ModuleItem { ModuleItem::TraitDef(node) }
5124 ModuleItem::TraitDef(node)
5125 }
5126} 4142}
5127impl From<TypeAliasDef> for ModuleItem { 4143impl From<TypeAliasDef> for ModuleItem {
5128 fn from(node: TypeAliasDef) -> ModuleItem { 4144 fn from(node: TypeAliasDef) -> ModuleItem { ModuleItem::TypeAliasDef(node) }
5129 ModuleItem::TypeAliasDef(node)
5130 }
5131} 4145}
5132impl From<ImplDef> for ModuleItem { 4146impl From<ImplDef> for ModuleItem {
5133 fn from(node: ImplDef) -> ModuleItem { 4147 fn from(node: ImplDef) -> ModuleItem { ModuleItem::ImplDef(node) }
5134 ModuleItem::ImplDef(node)
5135 }
5136} 4148}
5137impl From<UseItem> for ModuleItem { 4149impl From<UseItem> for ModuleItem {
5138 fn from(node: UseItem) -> ModuleItem { 4150 fn from(node: UseItem) -> ModuleItem { ModuleItem::UseItem(node) }
5139 ModuleItem::UseItem(node)
5140 }
5141} 4151}
5142impl From<ExternCrateItem> for ModuleItem { 4152impl From<ExternCrateItem> for ModuleItem {
5143 fn from(node: ExternCrateItem) -> ModuleItem { 4153 fn from(node: ExternCrateItem) -> ModuleItem { ModuleItem::ExternCrateItem(node) }
5144 ModuleItem::ExternCrateItem(node)
5145 }
5146} 4154}
5147impl From<ConstDef> for ModuleItem { 4155impl From<ConstDef> for ModuleItem {
5148 fn from(node: ConstDef) -> ModuleItem { 4156 fn from(node: ConstDef) -> ModuleItem { ModuleItem::ConstDef(node) }
5149 ModuleItem::ConstDef(node)
5150 }
5151} 4157}
5152impl From<StaticDef> for ModuleItem { 4158impl From<StaticDef> for ModuleItem {
5153 fn from(node: StaticDef) -> ModuleItem { 4159 fn from(node: StaticDef) -> ModuleItem { ModuleItem::StaticDef(node) }
5154 ModuleItem::StaticDef(node)
5155 }
5156} 4160}
5157impl From<Module> for ModuleItem { 4161impl From<Module> for ModuleItem {
5158 fn from(node: Module) -> ModuleItem { 4162 fn from(node: Module) -> ModuleItem { ModuleItem::Module(node) }
5159 ModuleItem::Module(node)
5160 }
5161} 4163}
5162impl From<MacroCall> for ModuleItem { 4164impl From<MacroCall> for ModuleItem {
5163 fn from(node: MacroCall) -> ModuleItem { 4165 fn from(node: MacroCall) -> ModuleItem { ModuleItem::MacroCall(node) }
5164 ModuleItem::MacroCall(node)
5165 }
5166} 4166}
5167impl From<ExternBlock> for ModuleItem { 4167impl From<ExternBlock> for ModuleItem {
5168 fn from(node: ExternBlock) -> ModuleItem { 4168 fn from(node: ExternBlock) -> ModuleItem { ModuleItem::ExternBlock(node) }
5169 ModuleItem::ExternBlock(node)
5170 }
5171} 4169}
5172impl std::fmt::Display for ModuleItem { 4170impl std::fmt::Display for ModuleItem {
5173 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 4171 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -5232,19 +4230,13 @@ pub enum ImplItem {
5232 ConstDef(ConstDef), 4230 ConstDef(ConstDef),
5233} 4231}
5234impl From<FnDef> for ImplItem { 4232impl From<FnDef> for ImplItem {
5235 fn from(node: FnDef) -> ImplItem { 4233 fn from(node: FnDef) -> ImplItem { ImplItem::FnDef(node) }
5236 ImplItem::FnDef(node)
5237 }
5238} 4234}
5239impl From<TypeAliasDef> for ImplItem { 4235impl From<TypeAliasDef> for ImplItem {
5240 fn from(node: TypeAliasDef) -> ImplItem { 4236 fn from(node: TypeAliasDef) -> ImplItem { ImplItem::TypeAliasDef(node) }
5241 ImplItem::TypeAliasDef(node)
5242 }
5243} 4237}
5244impl From<ConstDef> for ImplItem { 4238impl From<ConstDef> for ImplItem {
5245 fn from(node: ConstDef) -> ImplItem { 4239 fn from(node: ConstDef) -> ImplItem { ImplItem::ConstDef(node) }
5246 ImplItem::ConstDef(node)
5247 }
5248} 4240}
5249impl std::fmt::Display for ImplItem { 4241impl std::fmt::Display for ImplItem {
5250 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 4242 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -5283,14 +4275,10 @@ pub enum ExternItem {
5283 StaticDef(StaticDef), 4275 StaticDef(StaticDef),
5284} 4276}
5285impl From<FnDef> for ExternItem { 4277impl From<FnDef> for ExternItem {
5286 fn from(node: FnDef) -> ExternItem { 4278 fn from(node: FnDef) -> ExternItem { ExternItem::FnDef(node) }
5287 ExternItem::FnDef(node)
5288 }
5289} 4279}
5290impl From<StaticDef> for ExternItem { 4280impl From<StaticDef> for ExternItem {
5291 fn from(node: StaticDef) -> ExternItem { 4281 fn from(node: StaticDef) -> ExternItem { ExternItem::StaticDef(node) }
5292 ExternItem::StaticDef(node)
5293 }
5294} 4282}
5295impl std::fmt::Display for ExternItem { 4283impl std::fmt::Display for ExternItem {
5296 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 4284 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -5357,159 +4345,97 @@ pub enum Expr {
5357 BoxExpr(BoxExpr), 4345 BoxExpr(BoxExpr),
5358} 4346}
5359impl From<TupleExpr> for Expr { 4347impl From<TupleExpr> for Expr {
5360 fn from(node: TupleExpr) -> Expr { 4348 fn from(node: TupleExpr) -> Expr { Expr::TupleExpr(node) }
5361 Expr::TupleExpr(node)
5362 }
5363} 4349}
5364impl From<ArrayExpr> for Expr { 4350impl From<ArrayExpr> for Expr {
5365 fn from(node: ArrayExpr) -> Expr { 4351 fn from(node: ArrayExpr) -> Expr { Expr::ArrayExpr(node) }
5366 Expr::ArrayExpr(node)
5367 }
5368} 4352}
5369impl From<ParenExpr> for Expr { 4353impl From<ParenExpr> for Expr {
5370 fn from(node: ParenExpr) -> Expr { 4354 fn from(node: ParenExpr) -> Expr { Expr::ParenExpr(node) }
5371 Expr::ParenExpr(node)
5372 }
5373} 4355}
5374impl From<PathExpr> for Expr { 4356impl From<PathExpr> for Expr {
5375 fn from(node: PathExpr) -> Expr { 4357 fn from(node: PathExpr) -> Expr { Expr::PathExpr(node) }
5376 Expr::PathExpr(node)
5377 }
5378} 4358}
5379impl From<LambdaExpr> for Expr { 4359impl From<LambdaExpr> for Expr {
5380 fn from(node: LambdaExpr) -> Expr { 4360 fn from(node: LambdaExpr) -> Expr { Expr::LambdaExpr(node) }
5381 Expr::LambdaExpr(node)
5382 }
5383} 4361}
5384impl From<IfExpr> for Expr { 4362impl From<IfExpr> for Expr {
5385 fn from(node: IfExpr) -> Expr { 4363 fn from(node: IfExpr) -> Expr { Expr::IfExpr(node) }
5386 Expr::IfExpr(node)
5387 }
5388} 4364}
5389impl From<LoopExpr> for Expr { 4365impl From<LoopExpr> for Expr {
5390 fn from(node: LoopExpr) -> Expr { 4366 fn from(node: LoopExpr) -> Expr { Expr::LoopExpr(node) }
5391 Expr::LoopExpr(node)
5392 }
5393} 4367}
5394impl From<ForExpr> for Expr { 4368impl From<ForExpr> for Expr {
5395 fn from(node: ForExpr) -> Expr { 4369 fn from(node: ForExpr) -> Expr { Expr::ForExpr(node) }
5396 Expr::ForExpr(node)
5397 }
5398} 4370}
5399impl From<WhileExpr> for Expr { 4371impl From<WhileExpr> for Expr {
5400 fn from(node: WhileExpr) -> Expr { 4372 fn from(node: WhileExpr) -> Expr { Expr::WhileExpr(node) }
5401 Expr::WhileExpr(node)
5402 }
5403} 4373}
5404impl From<ContinueExpr> for Expr { 4374impl From<ContinueExpr> for Expr {
5405 fn from(node: ContinueExpr) -> Expr { 4375 fn from(node: ContinueExpr) -> Expr { Expr::ContinueExpr(node) }
5406 Expr::ContinueExpr(node)
5407 }
5408} 4376}
5409impl From<BreakExpr> for Expr { 4377impl From<BreakExpr> for Expr {
5410 fn from(node: BreakExpr) -> Expr { 4378 fn from(node: BreakExpr) -> Expr { Expr::BreakExpr(node) }
5411 Expr::BreakExpr(node)
5412 }
5413} 4379}
5414impl From<Label> for Expr { 4380impl From<Label> for Expr {
5415 fn from(node: Label) -> Expr { 4381 fn from(node: Label) -> Expr { Expr::Label(node) }
5416 Expr::Label(node)
5417 }
5418} 4382}
5419impl From<BlockExpr> for Expr { 4383impl From<BlockExpr> for Expr {
5420 fn from(node: BlockExpr) -> Expr { 4384 fn from(node: BlockExpr) -> Expr { Expr::BlockExpr(node) }
5421 Expr::BlockExpr(node)
5422 }
5423} 4385}
5424impl From<ReturnExpr> for Expr { 4386impl From<ReturnExpr> for Expr {
5425 fn from(node: ReturnExpr) -> Expr { 4387 fn from(node: ReturnExpr) -> Expr { Expr::ReturnExpr(node) }
5426 Expr::ReturnExpr(node)
5427 }
5428} 4388}
5429impl From<MatchExpr> for Expr { 4389impl From<MatchExpr> for Expr {
5430 fn from(node: MatchExpr) -> Expr { 4390 fn from(node: MatchExpr) -> Expr { Expr::MatchExpr(node) }
5431 Expr::MatchExpr(node)
5432 }
5433} 4391}
5434impl From<RecordLit> for Expr { 4392impl From<RecordLit> for Expr {
5435 fn from(node: RecordLit) -> Expr { 4393 fn from(node: RecordLit) -> Expr { Expr::RecordLit(node) }
5436 Expr::RecordLit(node)
5437 }
5438} 4394}
5439impl From<CallExpr> for Expr { 4395impl From<CallExpr> for Expr {
5440 fn from(node: CallExpr) -> Expr { 4396 fn from(node: CallExpr) -> Expr { Expr::CallExpr(node) }
5441 Expr::CallExpr(node)
5442 }
5443} 4397}
5444impl From<IndexExpr> for Expr { 4398impl From<IndexExpr> for Expr {
5445 fn from(node: IndexExpr) -> Expr { 4399 fn from(node: IndexExpr) -> Expr { Expr::IndexExpr(node) }
5446 Expr::IndexExpr(node)
5447 }
5448} 4400}
5449impl From<MethodCallExpr> for Expr { 4401impl From<MethodCallExpr> for Expr {
5450 fn from(node: MethodCallExpr) -> Expr { 4402 fn from(node: MethodCallExpr) -> Expr { Expr::MethodCallExpr(node) }
5451 Expr::MethodCallExpr(node)
5452 }
5453} 4403}
5454impl From<FieldExpr> for Expr { 4404impl From<FieldExpr> for Expr {
5455 fn from(node: FieldExpr) -> Expr { 4405 fn from(node: FieldExpr) -> Expr { Expr::FieldExpr(node) }
5456 Expr::FieldExpr(node)
5457 }
5458} 4406}
5459impl From<AwaitExpr> for Expr { 4407impl From<AwaitExpr> for Expr {
5460 fn from(node: AwaitExpr) -> Expr { 4408 fn from(node: AwaitExpr) -> Expr { Expr::AwaitExpr(node) }
5461 Expr::AwaitExpr(node)
5462 }
5463} 4409}
5464impl From<TryExpr> for Expr { 4410impl From<TryExpr> for Expr {
5465 fn from(node: TryExpr) -> Expr { 4411 fn from(node: TryExpr) -> Expr { Expr::TryExpr(node) }
5466 Expr::TryExpr(node)
5467 }
5468} 4412}
5469impl From<TryBlockExpr> for Expr { 4413impl From<TryBlockExpr> for Expr {
5470 fn from(node: TryBlockExpr) -> Expr { 4414 fn from(node: TryBlockExpr) -> Expr { Expr::TryBlockExpr(node) }
5471 Expr::TryBlockExpr(node)
5472 }
5473} 4415}
5474impl From<CastExpr> for Expr { 4416impl From<CastExpr> for Expr {
5475 fn from(node: CastExpr) -> Expr { 4417 fn from(node: CastExpr) -> Expr { Expr::CastExpr(node) }
5476 Expr::CastExpr(node)
5477 }
5478} 4418}
5479impl From<RefExpr> for Expr { 4419impl From<RefExpr> for Expr {
5480 fn from(node: RefExpr) -> Expr { 4420 fn from(node: RefExpr) -> Expr { Expr::RefExpr(node) }
5481 Expr::RefExpr(node)
5482 }
5483} 4421}
5484impl From<PrefixExpr> for Expr { 4422impl From<PrefixExpr> for Expr {
5485 fn from(node: PrefixExpr) -> Expr { 4423 fn from(node: PrefixExpr) -> Expr { Expr::PrefixExpr(node) }
5486 Expr::PrefixExpr(node)
5487 }
5488} 4424}
5489impl From<RangeExpr> for Expr { 4425impl From<RangeExpr> for Expr {
5490 fn from(node: RangeExpr) -> Expr { 4426 fn from(node: RangeExpr) -> Expr { Expr::RangeExpr(node) }
5491 Expr::RangeExpr(node)
5492 }
5493} 4427}
5494impl From<BinExpr> for Expr { 4428impl From<BinExpr> for Expr {
5495 fn from(node: BinExpr) -> Expr { 4429 fn from(node: BinExpr) -> Expr { Expr::BinExpr(node) }
5496 Expr::BinExpr(node)
5497 }
5498} 4430}
5499impl From<Literal> for Expr { 4431impl From<Literal> for Expr {
5500 fn from(node: Literal) -> Expr { 4432 fn from(node: Literal) -> Expr { Expr::Literal(node) }
5501 Expr::Literal(node)
5502 }
5503} 4433}
5504impl From<MacroCall> for Expr { 4434impl From<MacroCall> for Expr {
5505 fn from(node: MacroCall) -> Expr { 4435 fn from(node: MacroCall) -> Expr { Expr::MacroCall(node) }
5506 Expr::MacroCall(node)
5507 }
5508} 4436}
5509impl From<BoxExpr> for Expr { 4437impl From<BoxExpr> for Expr {
5510 fn from(node: BoxExpr) -> Expr { 4438 fn from(node: BoxExpr) -> Expr { Expr::BoxExpr(node) }
5511 Expr::BoxExpr(node)
5512 }
5513} 4439}
5514impl std::fmt::Display for Expr { 4440impl std::fmt::Display for Expr {
5515 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 4441 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -5621,79 +4547,49 @@ pub enum Pat {
5621 MacroPat(MacroPat), 4547 MacroPat(MacroPat),
5622} 4548}
5623impl From<OrPat> for Pat { 4549impl From<OrPat> for Pat {
5624 fn from(node: OrPat) -> Pat { 4550 fn from(node: OrPat) -> Pat { Pat::OrPat(node) }
5625 Pat::OrPat(node)
5626 }
5627} 4551}
5628impl From<ParenPat> for Pat { 4552impl From<ParenPat> for Pat {
5629 fn from(node: ParenPat) -> Pat { 4553 fn from(node: ParenPat) -> Pat { Pat::ParenPat(node) }
5630 Pat::ParenPat(node)
5631 }
5632} 4554}
5633impl From<RefPat> for Pat { 4555impl From<RefPat> for Pat {
5634 fn from(node: RefPat) -> Pat { 4556 fn from(node: RefPat) -> Pat { Pat::RefPat(node) }
5635 Pat::RefPat(node)
5636 }
5637} 4557}
5638impl From<BoxPat> for Pat { 4558impl From<BoxPat> for Pat {
5639 fn from(node: BoxPat) -> Pat { 4559 fn from(node: BoxPat) -> Pat { Pat::BoxPat(node) }
5640 Pat::BoxPat(node)
5641 }
5642} 4560}
5643impl From<BindPat> for Pat { 4561impl From<BindPat> for Pat {
5644 fn from(node: BindPat) -> Pat { 4562 fn from(node: BindPat) -> Pat { Pat::BindPat(node) }
5645 Pat::BindPat(node)
5646 }
5647} 4563}
5648impl From<PlaceholderPat> for Pat { 4564impl From<PlaceholderPat> for Pat {
5649 fn from(node: PlaceholderPat) -> Pat { 4565 fn from(node: PlaceholderPat) -> Pat { Pat::PlaceholderPat(node) }
5650 Pat::PlaceholderPat(node)
5651 }
5652} 4566}
5653impl From<DotDotPat> for Pat { 4567impl From<DotDotPat> for Pat {
5654 fn from(node: DotDotPat) -> Pat { 4568 fn from(node: DotDotPat) -> Pat { Pat::DotDotPat(node) }
5655 Pat::DotDotPat(node)
5656 }
5657} 4569}
5658impl From<PathPat> for Pat { 4570impl From<PathPat> for Pat {
5659 fn from(node: PathPat) -> Pat { 4571 fn from(node: PathPat) -> Pat { Pat::PathPat(node) }
5660 Pat::PathPat(node)
5661 }
5662} 4572}
5663impl From<RecordPat> for Pat { 4573impl From<RecordPat> for Pat {
5664 fn from(node: RecordPat) -> Pat { 4574 fn from(node: RecordPat) -> Pat { Pat::RecordPat(node) }
5665 Pat::RecordPat(node)
5666 }
5667} 4575}
5668impl From<TupleStructPat> for Pat { 4576impl From<TupleStructPat> for Pat {
5669 fn from(node: TupleStructPat) -> Pat { 4577 fn from(node: TupleStructPat) -> Pat { Pat::TupleStructPat(node) }
5670 Pat::TupleStructPat(node)
5671 }
5672} 4578}
5673impl From<TuplePat> for Pat { 4579impl From<TuplePat> for Pat {
5674 fn from(node: TuplePat) -> Pat { 4580 fn from(node: TuplePat) -> Pat { Pat::TuplePat(node) }
5675 Pat::TuplePat(node)
5676 }
5677} 4581}
5678impl From<SlicePat> for Pat { 4582impl From<SlicePat> for Pat {
5679 fn from(node: SlicePat) -> Pat { 4583 fn from(node: SlicePat) -> Pat { Pat::SlicePat(node) }
5680 Pat::SlicePat(node)
5681 }
5682} 4584}
5683impl From<RangePat> for Pat { 4585impl From<RangePat> for Pat {
5684 fn from(node: RangePat) -> Pat { 4586 fn from(node: RangePat) -> Pat { Pat::RangePat(node) }
5685 Pat::RangePat(node)
5686 }
5687} 4587}
5688impl From<LiteralPat> for Pat { 4588impl From<LiteralPat> for Pat {
5689 fn from(node: LiteralPat) -> Pat { 4589 fn from(node: LiteralPat) -> Pat { Pat::LiteralPat(node) }
5690 Pat::LiteralPat(node)
5691 }
5692} 4590}
5693impl From<MacroPat> for Pat { 4591impl From<MacroPat> for Pat {
5694 fn from(node: MacroPat) -> Pat { 4592 fn from(node: MacroPat) -> Pat { Pat::MacroPat(node) }
5695 Pat::MacroPat(node)
5696 }
5697} 4593}
5698impl std::fmt::Display for Pat { 4594impl std::fmt::Display for Pat {
5699 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 4595 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -5756,14 +4652,10 @@ pub enum RecordInnerPat {
5756 BindPat(BindPat), 4652 BindPat(BindPat),
5757} 4653}
5758impl From<RecordFieldPat> for RecordInnerPat { 4654impl From<RecordFieldPat> for RecordInnerPat {
5759 fn from(node: RecordFieldPat) -> RecordInnerPat { 4655 fn from(node: RecordFieldPat) -> RecordInnerPat { RecordInnerPat::RecordFieldPat(node) }
5760 RecordInnerPat::RecordFieldPat(node)
5761 }
5762} 4656}
5763impl From<BindPat> for RecordInnerPat { 4657impl From<BindPat> for RecordInnerPat {
5764 fn from(node: BindPat) -> RecordInnerPat { 4658 fn from(node: BindPat) -> RecordInnerPat { RecordInnerPat::BindPat(node) }
5765 RecordInnerPat::BindPat(node)
5766 }
5767} 4659}
5768impl std::fmt::Display for RecordInnerPat { 4660impl std::fmt::Display for RecordInnerPat {
5769 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 4661 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -5798,14 +4690,10 @@ pub enum AttrInput {
5798 TokenTree(TokenTree), 4690 TokenTree(TokenTree),
5799} 4691}
5800impl From<Literal> for AttrInput { 4692impl From<Literal> for AttrInput {
5801 fn from(node: Literal) -> AttrInput { 4693 fn from(node: Literal) -> AttrInput { AttrInput::Literal(node) }
5802 AttrInput::Literal(node)
5803 }
5804} 4694}
5805impl From<TokenTree> for AttrInput { 4695impl From<TokenTree> for AttrInput {
5806 fn from(node: TokenTree) -> AttrInput { 4696 fn from(node: TokenTree) -> AttrInput { AttrInput::TokenTree(node) }
5807 AttrInput::TokenTree(node)
5808 }
5809} 4697}
5810impl std::fmt::Display for AttrInput { 4698impl std::fmt::Display for AttrInput {
5811 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 4699 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -5840,14 +4728,10 @@ pub enum Stmt {
5840 ExprStmt(ExprStmt), 4728 ExprStmt(ExprStmt),
5841} 4729}
5842impl From<LetStmt> for Stmt { 4730impl From<LetStmt> for Stmt {
5843 fn from(node: LetStmt) -> Stmt { 4731 fn from(node: LetStmt) -> Stmt { Stmt::LetStmt(node) }
5844 Stmt::LetStmt(node)
5845 }
5846} 4732}
5847impl From<ExprStmt> for Stmt { 4733impl From<ExprStmt> for Stmt {
5848 fn from(node: ExprStmt) -> Stmt { 4734 fn from(node: ExprStmt) -> Stmt { Stmt::ExprStmt(node) }
5849 Stmt::ExprStmt(node)
5850 }
5851} 4735}
5852impl std::fmt::Display for Stmt { 4736impl std::fmt::Display for Stmt {
5853 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 4737 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -5882,14 +4766,10 @@ pub enum FieldDefList {
5882 TupleFieldDefList(TupleFieldDefList), 4766 TupleFieldDefList(TupleFieldDefList),
5883} 4767}
5884impl From<RecordFieldDefList> for FieldDefList { 4768impl From<RecordFieldDefList> for FieldDefList {
5885 fn from(node: RecordFieldDefList) -> FieldDefList { 4769 fn from(node: RecordFieldDefList) -> FieldDefList { FieldDefList::RecordFieldDefList(node) }
5886 FieldDefList::RecordFieldDefList(node)
5887 }
5888} 4770}
5889impl From<TupleFieldDefList> for FieldDefList { 4771impl From<TupleFieldDefList> for FieldDefList {
5890 fn from(node: TupleFieldDefList) -> FieldDefList { 4772 fn from(node: TupleFieldDefList) -> FieldDefList { FieldDefList::TupleFieldDefList(node) }
5891 FieldDefList::TupleFieldDefList(node)
5892 }
5893} 4773}
5894impl std::fmt::Display for FieldDefList { 4774impl std::fmt::Display for FieldDefList {
5895 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 4775 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {