aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_syntax/src/ast/generated.rs2
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs2240
-rw-r--r--crates/ra_syntax/src/ast/generated/tokens.rs672
-rw-r--r--xtask/src/lib.rs1
4 files changed, 731 insertions, 2184 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs
index 1e0ba3f71..f5199e09f 100644
--- a/crates/ra_syntax/src/ast/generated.rs
+++ b/crates/ra_syntax/src/ast/generated.rs
@@ -1,4 +1,6 @@
1//! This file is actually hand-written, but the submodules are indeed generated. 1//! This file is actually hand-written, but the submodules are indeed generated.
2 2
3#[rustfmt::skip]
3pub(super) mod nodes; 4pub(super) mod nodes;
5#[rustfmt::skip]
4pub(super) mod tokens; 6pub(super) mod tokens;
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 {
diff --git a/crates/ra_syntax/src/ast/generated/tokens.rs b/crates/ra_syntax/src/ast/generated/tokens.rs
index 3aea5bef1..ec3ca4a5b 100644
--- a/crates/ra_syntax/src/ast/generated/tokens.rs
+++ b/crates/ra_syntax/src/ast/generated/tokens.rs
@@ -28,9 +28,7 @@ impl AstToken for Semi {
28 None 28 None
29 } 29 }
30 } 30 }
31 fn syntax(&self) -> &SyntaxToken { 31 fn syntax(&self) -> &SyntaxToken { &self.syntax }
32 &self.syntax
33 }
34} 32}
35#[derive(Debug, Clone, PartialEq, Eq, Hash)] 33#[derive(Debug, Clone, PartialEq, Eq, Hash)]
36pub struct Comma { 34pub struct Comma {
@@ -55,9 +53,7 @@ impl AstToken for Comma {
55 None 53 None
56 } 54 }
57 } 55 }
58 fn syntax(&self) -> &SyntaxToken { 56 fn syntax(&self) -> &SyntaxToken { &self.syntax }
59 &self.syntax
60 }
61} 57}
62#[derive(Debug, Clone, PartialEq, Eq, Hash)] 58#[derive(Debug, Clone, PartialEq, Eq, Hash)]
63pub struct LParen { 59pub struct LParen {
@@ -82,9 +78,7 @@ impl AstToken for LParen {
82 None 78 None
83 } 79 }
84 } 80 }
85 fn syntax(&self) -> &SyntaxToken { 81 fn syntax(&self) -> &SyntaxToken { &self.syntax }
86 &self.syntax
87 }
88} 82}
89#[derive(Debug, Clone, PartialEq, Eq, Hash)] 83#[derive(Debug, Clone, PartialEq, Eq, Hash)]
90pub struct RParen { 84pub struct RParen {
@@ -109,9 +103,7 @@ impl AstToken for RParen {
109 None 103 None
110 } 104 }
111 } 105 }
112 fn syntax(&self) -> &SyntaxToken { 106 fn syntax(&self) -> &SyntaxToken { &self.syntax }
113 &self.syntax
114 }
115} 107}
116#[derive(Debug, Clone, PartialEq, Eq, Hash)] 108#[derive(Debug, Clone, PartialEq, Eq, Hash)]
117pub struct LCurly { 109pub struct LCurly {
@@ -136,9 +128,7 @@ impl AstToken for LCurly {
136 None 128 None
137 } 129 }
138 } 130 }
139 fn syntax(&self) -> &SyntaxToken { 131 fn syntax(&self) -> &SyntaxToken { &self.syntax }
140 &self.syntax
141 }
142} 132}
143#[derive(Debug, Clone, PartialEq, Eq, Hash)] 133#[derive(Debug, Clone, PartialEq, Eq, Hash)]
144pub struct RCurly { 134pub struct RCurly {
@@ -163,9 +153,7 @@ impl AstToken for RCurly {
163 None 153 None
164 } 154 }
165 } 155 }
166 fn syntax(&self) -> &SyntaxToken { 156 fn syntax(&self) -> &SyntaxToken { &self.syntax }
167 &self.syntax
168 }
169} 157}
170#[derive(Debug, Clone, PartialEq, Eq, Hash)] 158#[derive(Debug, Clone, PartialEq, Eq, Hash)]
171pub struct LBrack { 159pub struct LBrack {
@@ -190,9 +178,7 @@ impl AstToken for LBrack {
190 None 178 None
191 } 179 }
192 } 180 }
193 fn syntax(&self) -> &SyntaxToken { 181 fn syntax(&self) -> &SyntaxToken { &self.syntax }
194 &self.syntax
195 }
196} 182}
197#[derive(Debug, Clone, PartialEq, Eq, Hash)] 183#[derive(Debug, Clone, PartialEq, Eq, Hash)]
198pub struct RBrack { 184pub struct RBrack {
@@ -217,9 +203,7 @@ impl AstToken for RBrack {
217 None 203 None
218 } 204 }
219 } 205 }
220 fn syntax(&self) -> &SyntaxToken { 206 fn syntax(&self) -> &SyntaxToken { &self.syntax }
221 &self.syntax
222 }
223} 207}
224#[derive(Debug, Clone, PartialEq, Eq, Hash)] 208#[derive(Debug, Clone, PartialEq, Eq, Hash)]
225pub struct LAngle { 209pub struct LAngle {
@@ -244,9 +228,7 @@ impl AstToken for LAngle {
244 None 228 None
245 } 229 }
246 } 230 }
247 fn syntax(&self) -> &SyntaxToken { 231 fn syntax(&self) -> &SyntaxToken { &self.syntax }
248 &self.syntax
249 }
250} 232}
251#[derive(Debug, Clone, PartialEq, Eq, Hash)] 233#[derive(Debug, Clone, PartialEq, Eq, Hash)]
252pub struct RAngle { 234pub struct RAngle {
@@ -271,9 +253,7 @@ impl AstToken for RAngle {
271 None 253 None
272 } 254 }
273 } 255 }
274 fn syntax(&self) -> &SyntaxToken { 256 fn syntax(&self) -> &SyntaxToken { &self.syntax }
275 &self.syntax
276 }
277} 257}
278#[derive(Debug, Clone, PartialEq, Eq, Hash)] 258#[derive(Debug, Clone, PartialEq, Eq, Hash)]
279pub struct At { 259pub struct At {
@@ -298,9 +278,7 @@ impl AstToken for At {
298 None 278 None
299 } 279 }
300 } 280 }
301 fn syntax(&self) -> &SyntaxToken { 281 fn syntax(&self) -> &SyntaxToken { &self.syntax }
302 &self.syntax
303 }
304} 282}
305#[derive(Debug, Clone, PartialEq, Eq, Hash)] 283#[derive(Debug, Clone, PartialEq, Eq, Hash)]
306pub struct Pound { 284pub struct Pound {
@@ -325,9 +303,7 @@ impl AstToken for Pound {
325 None 303 None
326 } 304 }
327 } 305 }
328 fn syntax(&self) -> &SyntaxToken { 306 fn syntax(&self) -> &SyntaxToken { &self.syntax }
329 &self.syntax
330 }
331} 307}
332#[derive(Debug, Clone, PartialEq, Eq, Hash)] 308#[derive(Debug, Clone, PartialEq, Eq, Hash)]
333pub struct Tilde { 309pub struct Tilde {
@@ -352,9 +328,7 @@ impl AstToken for Tilde {
352 None 328 None
353 } 329 }
354 } 330 }
355 fn syntax(&self) -> &SyntaxToken { 331 fn syntax(&self) -> &SyntaxToken { &self.syntax }
356 &self.syntax
357 }
358} 332}
359#[derive(Debug, Clone, PartialEq, Eq, Hash)] 333#[derive(Debug, Clone, PartialEq, Eq, Hash)]
360pub struct Question { 334pub struct Question {
@@ -379,9 +353,7 @@ impl AstToken for Question {
379 None 353 None
380 } 354 }
381 } 355 }
382 fn syntax(&self) -> &SyntaxToken { 356 fn syntax(&self) -> &SyntaxToken { &self.syntax }
383 &self.syntax
384 }
385} 357}
386#[derive(Debug, Clone, PartialEq, Eq, Hash)] 358#[derive(Debug, Clone, PartialEq, Eq, Hash)]
387pub struct Dollar { 359pub struct Dollar {
@@ -406,9 +378,7 @@ impl AstToken for Dollar {
406 None 378 None
407 } 379 }
408 } 380 }
409 fn syntax(&self) -> &SyntaxToken { 381 fn syntax(&self) -> &SyntaxToken { &self.syntax }
410 &self.syntax
411 }
412} 382}
413#[derive(Debug, Clone, PartialEq, Eq, Hash)] 383#[derive(Debug, Clone, PartialEq, Eq, Hash)]
414pub struct Amp { 384pub struct Amp {
@@ -433,9 +403,7 @@ impl AstToken for Amp {
433 None 403 None
434 } 404 }
435 } 405 }
436 fn syntax(&self) -> &SyntaxToken { 406 fn syntax(&self) -> &SyntaxToken { &self.syntax }
437 &self.syntax
438 }
439} 407}
440#[derive(Debug, Clone, PartialEq, Eq, Hash)] 408#[derive(Debug, Clone, PartialEq, Eq, Hash)]
441pub struct Pipe { 409pub struct Pipe {
@@ -460,9 +428,7 @@ impl AstToken for Pipe {
460 None 428 None
461 } 429 }
462 } 430 }
463 fn syntax(&self) -> &SyntaxToken { 431 fn syntax(&self) -> &SyntaxToken { &self.syntax }
464 &self.syntax
465 }
466} 432}
467#[derive(Debug, Clone, PartialEq, Eq, Hash)] 433#[derive(Debug, Clone, PartialEq, Eq, Hash)]
468pub struct Plus { 434pub struct Plus {
@@ -487,9 +453,7 @@ impl AstToken for Plus {
487 None 453 None
488 } 454 }
489 } 455 }
490 fn syntax(&self) -> &SyntaxToken { 456 fn syntax(&self) -> &SyntaxToken { &self.syntax }
491 &self.syntax
492 }
493} 457}
494#[derive(Debug, Clone, PartialEq, Eq, Hash)] 458#[derive(Debug, Clone, PartialEq, Eq, Hash)]
495pub struct Star { 459pub struct Star {
@@ -514,9 +478,7 @@ impl AstToken for Star {
514 None 478 None
515 } 479 }
516 } 480 }
517 fn syntax(&self) -> &SyntaxToken { 481 fn syntax(&self) -> &SyntaxToken { &self.syntax }
518 &self.syntax
519 }
520} 482}
521#[derive(Debug, Clone, PartialEq, Eq, Hash)] 483#[derive(Debug, Clone, PartialEq, Eq, Hash)]
522pub struct Slash { 484pub struct Slash {
@@ -541,9 +503,7 @@ impl AstToken for Slash {
541 None 503 None
542 } 504 }
543 } 505 }
544 fn syntax(&self) -> &SyntaxToken { 506 fn syntax(&self) -> &SyntaxToken { &self.syntax }
545 &self.syntax
546 }
547} 507}
548#[derive(Debug, Clone, PartialEq, Eq, Hash)] 508#[derive(Debug, Clone, PartialEq, Eq, Hash)]
549pub struct Caret { 509pub struct Caret {
@@ -568,9 +528,7 @@ impl AstToken for Caret {
568 None 528 None
569 } 529 }
570 } 530 }
571 fn syntax(&self) -> &SyntaxToken { 531 fn syntax(&self) -> &SyntaxToken { &self.syntax }
572 &self.syntax
573 }
574} 532}
575#[derive(Debug, Clone, PartialEq, Eq, Hash)] 533#[derive(Debug, Clone, PartialEq, Eq, Hash)]
576pub struct Percent { 534pub struct Percent {
@@ -595,9 +553,7 @@ impl AstToken for Percent {
595 None 553 None
596 } 554 }
597 } 555 }
598 fn syntax(&self) -> &SyntaxToken { 556 fn syntax(&self) -> &SyntaxToken { &self.syntax }
599 &self.syntax
600 }
601} 557}
602#[derive(Debug, Clone, PartialEq, Eq, Hash)] 558#[derive(Debug, Clone, PartialEq, Eq, Hash)]
603pub struct Underscore { 559pub struct Underscore {
@@ -622,9 +578,7 @@ impl AstToken for Underscore {
622 None 578 None
623 } 579 }
624 } 580 }
625 fn syntax(&self) -> &SyntaxToken { 581 fn syntax(&self) -> &SyntaxToken { &self.syntax }
626 &self.syntax
627 }
628} 582}
629#[derive(Debug, Clone, PartialEq, Eq, Hash)] 583#[derive(Debug, Clone, PartialEq, Eq, Hash)]
630pub struct Dot { 584pub struct Dot {
@@ -649,9 +603,7 @@ impl AstToken for Dot {
649 None 603 None
650 } 604 }
651 } 605 }
652 fn syntax(&self) -> &SyntaxToken { 606 fn syntax(&self) -> &SyntaxToken { &self.syntax }
653 &self.syntax
654 }
655} 607}
656#[derive(Debug, Clone, PartialEq, Eq, Hash)] 608#[derive(Debug, Clone, PartialEq, Eq, Hash)]
657pub struct Dotdot { 609pub struct Dotdot {
@@ -676,9 +628,7 @@ impl AstToken for Dotdot {
676 None 628 None
677 } 629 }
678 } 630 }
679 fn syntax(&self) -> &SyntaxToken { 631 fn syntax(&self) -> &SyntaxToken { &self.syntax }
680 &self.syntax
681 }
682} 632}
683#[derive(Debug, Clone, PartialEq, Eq, Hash)] 633#[derive(Debug, Clone, PartialEq, Eq, Hash)]
684pub struct Dotdotdot { 634pub struct Dotdotdot {
@@ -703,9 +653,7 @@ impl AstToken for Dotdotdot {
703 None 653 None
704 } 654 }
705 } 655 }
706 fn syntax(&self) -> &SyntaxToken { 656 fn syntax(&self) -> &SyntaxToken { &self.syntax }
707 &self.syntax
708 }
709} 657}
710#[derive(Debug, Clone, PartialEq, Eq, Hash)] 658#[derive(Debug, Clone, PartialEq, Eq, Hash)]
711pub struct Dotdoteq { 659pub struct Dotdoteq {
@@ -730,9 +678,7 @@ impl AstToken for Dotdoteq {
730 None 678 None
731 } 679 }
732 } 680 }
733 fn syntax(&self) -> &SyntaxToken { 681 fn syntax(&self) -> &SyntaxToken { &self.syntax }
734 &self.syntax
735 }
736} 682}
737#[derive(Debug, Clone, PartialEq, Eq, Hash)] 683#[derive(Debug, Clone, PartialEq, Eq, Hash)]
738pub struct Colon { 684pub struct Colon {
@@ -757,9 +703,7 @@ impl AstToken for Colon {
757 None 703 None
758 } 704 }
759 } 705 }
760 fn syntax(&self) -> &SyntaxToken { 706 fn syntax(&self) -> &SyntaxToken { &self.syntax }
761 &self.syntax
762 }
763} 707}
764#[derive(Debug, Clone, PartialEq, Eq, Hash)] 708#[derive(Debug, Clone, PartialEq, Eq, Hash)]
765pub struct Coloncolon { 709pub struct Coloncolon {
@@ -784,9 +728,7 @@ impl AstToken for Coloncolon {
784 None 728 None
785 } 729 }
786 } 730 }
787 fn syntax(&self) -> &SyntaxToken { 731 fn syntax(&self) -> &SyntaxToken { &self.syntax }
788 &self.syntax
789 }
790} 732}
791#[derive(Debug, Clone, PartialEq, Eq, Hash)] 733#[derive(Debug, Clone, PartialEq, Eq, Hash)]
792pub struct Eq { 734pub struct Eq {
@@ -811,9 +753,7 @@ impl AstToken for Eq {
811 None 753 None
812 } 754 }
813 } 755 }
814 fn syntax(&self) -> &SyntaxToken { 756 fn syntax(&self) -> &SyntaxToken { &self.syntax }
815 &self.syntax
816 }
817} 757}
818#[derive(Debug, Clone, PartialEq, Eq, Hash)] 758#[derive(Debug, Clone, PartialEq, Eq, Hash)]
819pub struct Eqeq { 759pub struct Eqeq {
@@ -838,9 +778,7 @@ impl AstToken for Eqeq {
838 None 778 None
839 } 779 }
840 } 780 }
841 fn syntax(&self) -> &SyntaxToken { 781 fn syntax(&self) -> &SyntaxToken { &self.syntax }
842 &self.syntax
843 }
844} 782}
845#[derive(Debug, Clone, PartialEq, Eq, Hash)] 783#[derive(Debug, Clone, PartialEq, Eq, Hash)]
846pub struct FatArrow { 784pub struct FatArrow {
@@ -865,9 +803,7 @@ impl AstToken for FatArrow {
865 None 803 None
866 } 804 }
867 } 805 }
868 fn syntax(&self) -> &SyntaxToken { 806 fn syntax(&self) -> &SyntaxToken { &self.syntax }
869 &self.syntax
870 }
871} 807}
872#[derive(Debug, Clone, PartialEq, Eq, Hash)] 808#[derive(Debug, Clone, PartialEq, Eq, Hash)]
873pub struct Excl { 809pub struct Excl {
@@ -892,9 +828,7 @@ impl AstToken for Excl {
892 None 828 None
893 } 829 }
894 } 830 }
895 fn syntax(&self) -> &SyntaxToken { 831 fn syntax(&self) -> &SyntaxToken { &self.syntax }
896 &self.syntax
897 }
898} 832}
899#[derive(Debug, Clone, PartialEq, Eq, Hash)] 833#[derive(Debug, Clone, PartialEq, Eq, Hash)]
900pub struct Neq { 834pub struct Neq {
@@ -919,9 +853,7 @@ impl AstToken for Neq {
919 None 853 None
920 } 854 }
921 } 855 }
922 fn syntax(&self) -> &SyntaxToken { 856 fn syntax(&self) -> &SyntaxToken { &self.syntax }
923 &self.syntax
924 }
925} 857}
926#[derive(Debug, Clone, PartialEq, Eq, Hash)] 858#[derive(Debug, Clone, PartialEq, Eq, Hash)]
927pub struct Minus { 859pub struct Minus {
@@ -946,9 +878,7 @@ impl AstToken for Minus {
946 None 878 None
947 } 879 }
948 } 880 }
949 fn syntax(&self) -> &SyntaxToken { 881 fn syntax(&self) -> &SyntaxToken { &self.syntax }
950 &self.syntax
951 }
952} 882}
953#[derive(Debug, Clone, PartialEq, Eq, Hash)] 883#[derive(Debug, Clone, PartialEq, Eq, Hash)]
954pub struct ThinArrow { 884pub struct ThinArrow {
@@ -973,9 +903,7 @@ impl AstToken for ThinArrow {
973 None 903 None
974 } 904 }
975 } 905 }
976 fn syntax(&self) -> &SyntaxToken { 906 fn syntax(&self) -> &SyntaxToken { &self.syntax }
977 &self.syntax
978 }
979} 907}
980#[derive(Debug, Clone, PartialEq, Eq, Hash)] 908#[derive(Debug, Clone, PartialEq, Eq, Hash)]
981pub struct Lteq { 909pub struct Lteq {
@@ -1000,9 +928,7 @@ impl AstToken for Lteq {
1000 None 928 None
1001 } 929 }
1002 } 930 }
1003 fn syntax(&self) -> &SyntaxToken { 931 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1004 &self.syntax
1005 }
1006} 932}
1007#[derive(Debug, Clone, PartialEq, Eq, Hash)] 933#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1008pub struct Gteq { 934pub struct Gteq {
@@ -1027,9 +953,7 @@ impl AstToken for Gteq {
1027 None 953 None
1028 } 954 }
1029 } 955 }
1030 fn syntax(&self) -> &SyntaxToken { 956 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1031 &self.syntax
1032 }
1033} 957}
1034#[derive(Debug, Clone, PartialEq, Eq, Hash)] 958#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1035pub struct Pluseq { 959pub struct Pluseq {
@@ -1054,9 +978,7 @@ impl AstToken for Pluseq {
1054 None 978 None
1055 } 979 }
1056 } 980 }
1057 fn syntax(&self) -> &SyntaxToken { 981 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1058 &self.syntax
1059 }
1060} 982}
1061#[derive(Debug, Clone, PartialEq, Eq, Hash)] 983#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1062pub struct Minuseq { 984pub struct Minuseq {
@@ -1081,9 +1003,7 @@ impl AstToken for Minuseq {
1081 None 1003 None
1082 } 1004 }
1083 } 1005 }
1084 fn syntax(&self) -> &SyntaxToken { 1006 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1085 &self.syntax
1086 }
1087} 1007}
1088#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1008#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1089pub struct Pipeeq { 1009pub struct Pipeeq {
@@ -1108,9 +1028,7 @@ impl AstToken for Pipeeq {
1108 None 1028 None
1109 } 1029 }
1110 } 1030 }
1111 fn syntax(&self) -> &SyntaxToken { 1031 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1112 &self.syntax
1113 }
1114} 1032}
1115#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1033#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1116pub struct Ampeq { 1034pub struct Ampeq {
@@ -1135,9 +1053,7 @@ impl AstToken for Ampeq {
1135 None 1053 None
1136 } 1054 }
1137 } 1055 }
1138 fn syntax(&self) -> &SyntaxToken { 1056 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1139 &self.syntax
1140 }
1141} 1057}
1142#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1058#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1143pub struct Careteq { 1059pub struct Careteq {
@@ -1162,9 +1078,7 @@ impl AstToken for Careteq {
1162 None 1078 None
1163 } 1079 }
1164 } 1080 }
1165 fn syntax(&self) -> &SyntaxToken { 1081 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1166 &self.syntax
1167 }
1168} 1082}
1169#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1083#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1170pub struct Slasheq { 1084pub struct Slasheq {
@@ -1189,9 +1103,7 @@ impl AstToken for Slasheq {
1189 None 1103 None
1190 } 1104 }
1191 } 1105 }
1192 fn syntax(&self) -> &SyntaxToken { 1106 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1193 &self.syntax
1194 }
1195} 1107}
1196#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1108#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1197pub struct Stareq { 1109pub struct Stareq {
@@ -1216,9 +1128,7 @@ impl AstToken for Stareq {
1216 None 1128 None
1217 } 1129 }
1218 } 1130 }
1219 fn syntax(&self) -> &SyntaxToken { 1131 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1220 &self.syntax
1221 }
1222} 1132}
1223#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1133#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1224pub struct Percenteq { 1134pub struct Percenteq {
@@ -1243,9 +1153,7 @@ impl AstToken for Percenteq {
1243 None 1153 None
1244 } 1154 }
1245 } 1155 }
1246 fn syntax(&self) -> &SyntaxToken { 1156 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1247 &self.syntax
1248 }
1249} 1157}
1250#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1158#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1251pub struct Ampamp { 1159pub struct Ampamp {
@@ -1270,9 +1178,7 @@ impl AstToken for Ampamp {
1270 None 1178 None
1271 } 1179 }
1272 } 1180 }
1273 fn syntax(&self) -> &SyntaxToken { 1181 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1274 &self.syntax
1275 }
1276} 1182}
1277#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1183#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1278pub struct Pipepipe { 1184pub struct Pipepipe {
@@ -1297,9 +1203,7 @@ impl AstToken for Pipepipe {
1297 None 1203 None
1298 } 1204 }
1299 } 1205 }
1300 fn syntax(&self) -> &SyntaxToken { 1206 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1301 &self.syntax
1302 }
1303} 1207}
1304#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1208#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1305pub struct Shl { 1209pub struct Shl {
@@ -1324,9 +1228,7 @@ impl AstToken for Shl {
1324 None 1228 None
1325 } 1229 }
1326 } 1230 }
1327 fn syntax(&self) -> &SyntaxToken { 1231 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1328 &self.syntax
1329 }
1330} 1232}
1331#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1233#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1332pub struct Shr { 1234pub struct Shr {
@@ -1351,9 +1253,7 @@ impl AstToken for Shr {
1351 None 1253 None
1352 } 1254 }
1353 } 1255 }
1354 fn syntax(&self) -> &SyntaxToken { 1256 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1355 &self.syntax
1356 }
1357} 1257}
1358#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1258#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1359pub struct Shleq { 1259pub struct Shleq {
@@ -1378,9 +1278,7 @@ impl AstToken for Shleq {
1378 None 1278 None
1379 } 1279 }
1380 } 1280 }
1381 fn syntax(&self) -> &SyntaxToken { 1281 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1382 &self.syntax
1383 }
1384} 1282}
1385#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1283#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1386pub struct Shreq { 1284pub struct Shreq {
@@ -1405,9 +1303,7 @@ impl AstToken for Shreq {
1405 None 1303 None
1406 } 1304 }
1407 } 1305 }
1408 fn syntax(&self) -> &SyntaxToken { 1306 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1409 &self.syntax
1410 }
1411} 1307}
1412#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1308#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1413pub struct AsKw { 1309pub struct AsKw {
@@ -1432,9 +1328,7 @@ impl AstToken for AsKw {
1432 None 1328 None
1433 } 1329 }
1434 } 1330 }
1435 fn syntax(&self) -> &SyntaxToken { 1331 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1436 &self.syntax
1437 }
1438} 1332}
1439#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1333#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1440pub struct AsyncKw { 1334pub struct AsyncKw {
@@ -1459,9 +1353,7 @@ impl AstToken for AsyncKw {
1459 None 1353 None
1460 } 1354 }
1461 } 1355 }
1462 fn syntax(&self) -> &SyntaxToken { 1356 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1463 &self.syntax
1464 }
1465} 1357}
1466#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1358#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1467pub struct AwaitKw { 1359pub struct AwaitKw {
@@ -1486,9 +1378,7 @@ impl AstToken for AwaitKw {
1486 None 1378 None
1487 } 1379 }
1488 } 1380 }
1489 fn syntax(&self) -> &SyntaxToken { 1381 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1490 &self.syntax
1491 }
1492} 1382}
1493#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1383#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1494pub struct BoxKw { 1384pub struct BoxKw {
@@ -1513,9 +1403,7 @@ impl AstToken for BoxKw {
1513 None 1403 None
1514 } 1404 }
1515 } 1405 }
1516 fn syntax(&self) -> &SyntaxToken { 1406 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1517 &self.syntax
1518 }
1519} 1407}
1520#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1408#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1521pub struct BreakKw { 1409pub struct BreakKw {
@@ -1540,9 +1428,7 @@ impl AstToken for BreakKw {
1540 None 1428 None
1541 } 1429 }
1542 } 1430 }
1543 fn syntax(&self) -> &SyntaxToken { 1431 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1544 &self.syntax
1545 }
1546} 1432}
1547#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1433#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1548pub struct ConstKw { 1434pub struct ConstKw {
@@ -1567,9 +1453,7 @@ impl AstToken for ConstKw {
1567 None 1453 None
1568 } 1454 }
1569 } 1455 }
1570 fn syntax(&self) -> &SyntaxToken { 1456 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1571 &self.syntax
1572 }
1573} 1457}
1574#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1458#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1575pub struct ContinueKw { 1459pub struct ContinueKw {
@@ -1594,9 +1478,7 @@ impl AstToken for ContinueKw {
1594 None 1478 None
1595 } 1479 }
1596 } 1480 }
1597 fn syntax(&self) -> &SyntaxToken { 1481 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1598 &self.syntax
1599 }
1600} 1482}
1601#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1483#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1602pub struct CrateKw { 1484pub struct CrateKw {
@@ -1621,9 +1503,7 @@ impl AstToken for CrateKw {
1621 None 1503 None
1622 } 1504 }
1623 } 1505 }
1624 fn syntax(&self) -> &SyntaxToken { 1506 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1625 &self.syntax
1626 }
1627} 1507}
1628#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1508#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1629pub struct DynKw { 1509pub struct DynKw {
@@ -1648,9 +1528,7 @@ impl AstToken for DynKw {
1648 None 1528 None
1649 } 1529 }
1650 } 1530 }
1651 fn syntax(&self) -> &SyntaxToken { 1531 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1652 &self.syntax
1653 }
1654} 1532}
1655#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1533#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1656pub struct ElseKw { 1534pub struct ElseKw {
@@ -1675,9 +1553,7 @@ impl AstToken for ElseKw {
1675 None 1553 None
1676 } 1554 }
1677 } 1555 }
1678 fn syntax(&self) -> &SyntaxToken { 1556 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1679 &self.syntax
1680 }
1681} 1557}
1682#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1558#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1683pub struct EnumKw { 1559pub struct EnumKw {
@@ -1702,9 +1578,7 @@ impl AstToken for EnumKw {
1702 None 1578 None
1703 } 1579 }
1704 } 1580 }
1705 fn syntax(&self) -> &SyntaxToken { 1581 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1706 &self.syntax
1707 }
1708} 1582}
1709#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1583#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1710pub struct ExternKw { 1584pub struct ExternKw {
@@ -1729,9 +1603,7 @@ impl AstToken for ExternKw {
1729 None 1603 None
1730 } 1604 }
1731 } 1605 }
1732 fn syntax(&self) -> &SyntaxToken { 1606 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1733 &self.syntax
1734 }
1735} 1607}
1736#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1608#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1737pub struct FalseKw { 1609pub struct FalseKw {
@@ -1756,9 +1628,7 @@ impl AstToken for FalseKw {
1756 None 1628 None
1757 } 1629 }
1758 } 1630 }
1759 fn syntax(&self) -> &SyntaxToken { 1631 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1760 &self.syntax
1761 }
1762} 1632}
1763#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1633#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1764pub struct FnKw { 1634pub struct FnKw {
@@ -1783,9 +1653,7 @@ impl AstToken for FnKw {
1783 None 1653 None
1784 } 1654 }
1785 } 1655 }
1786 fn syntax(&self) -> &SyntaxToken { 1656 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1787 &self.syntax
1788 }
1789} 1657}
1790#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1658#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1791pub struct ForKw { 1659pub struct ForKw {
@@ -1810,9 +1678,7 @@ impl AstToken for ForKw {
1810 None 1678 None
1811 } 1679 }
1812 } 1680 }
1813 fn syntax(&self) -> &SyntaxToken { 1681 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1814 &self.syntax
1815 }
1816} 1682}
1817#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1683#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1818pub struct IfKw { 1684pub struct IfKw {
@@ -1837,9 +1703,7 @@ impl AstToken for IfKw {
1837 None 1703 None
1838 } 1704 }
1839 } 1705 }
1840 fn syntax(&self) -> &SyntaxToken { 1706 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1841 &self.syntax
1842 }
1843} 1707}
1844#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1708#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1845pub struct ImplKw { 1709pub struct ImplKw {
@@ -1864,9 +1728,7 @@ impl AstToken for ImplKw {
1864 None 1728 None
1865 } 1729 }
1866 } 1730 }
1867 fn syntax(&self) -> &SyntaxToken { 1731 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1868 &self.syntax
1869 }
1870} 1732}
1871#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1733#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1872pub struct InKw { 1734pub struct InKw {
@@ -1891,9 +1753,7 @@ impl AstToken for InKw {
1891 None 1753 None
1892 } 1754 }
1893 } 1755 }
1894 fn syntax(&self) -> &SyntaxToken { 1756 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1895 &self.syntax
1896 }
1897} 1757}
1898#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1758#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1899pub struct LetKw { 1759pub struct LetKw {
@@ -1918,9 +1778,7 @@ impl AstToken for LetKw {
1918 None 1778 None
1919 } 1779 }
1920 } 1780 }
1921 fn syntax(&self) -> &SyntaxToken { 1781 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1922 &self.syntax
1923 }
1924} 1782}
1925#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1783#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1926pub struct LoopKw { 1784pub struct LoopKw {
@@ -1945,9 +1803,7 @@ impl AstToken for LoopKw {
1945 None 1803 None
1946 } 1804 }
1947 } 1805 }
1948 fn syntax(&self) -> &SyntaxToken { 1806 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1949 &self.syntax
1950 }
1951} 1807}
1952#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1808#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1953pub struct MacroKw { 1809pub struct MacroKw {
@@ -1972,9 +1828,7 @@ impl AstToken for MacroKw {
1972 None 1828 None
1973 } 1829 }
1974 } 1830 }
1975 fn syntax(&self) -> &SyntaxToken { 1831 fn syntax(&self) -> &SyntaxToken { &self.syntax }
1976 &self.syntax
1977 }
1978} 1832}
1979#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1833#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1980pub struct MatchKw { 1834pub struct MatchKw {
@@ -1999,9 +1853,7 @@ impl AstToken for MatchKw {
1999 None 1853 None
2000 } 1854 }
2001 } 1855 }
2002 fn syntax(&self) -> &SyntaxToken { 1856 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2003 &self.syntax
2004 }
2005} 1857}
2006#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1858#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2007pub struct ModKw { 1859pub struct ModKw {
@@ -2026,9 +1878,7 @@ impl AstToken for ModKw {
2026 None 1878 None
2027 } 1879 }
2028 } 1880 }
2029 fn syntax(&self) -> &SyntaxToken { 1881 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2030 &self.syntax
2031 }
2032} 1882}
2033#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1883#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2034pub struct MoveKw { 1884pub struct MoveKw {
@@ -2053,9 +1903,7 @@ impl AstToken for MoveKw {
2053 None 1903 None
2054 } 1904 }
2055 } 1905 }
2056 fn syntax(&self) -> &SyntaxToken { 1906 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2057 &self.syntax
2058 }
2059} 1907}
2060#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1908#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2061pub struct MutKw { 1909pub struct MutKw {
@@ -2080,9 +1928,7 @@ impl AstToken for MutKw {
2080 None 1928 None
2081 } 1929 }
2082 } 1930 }
2083 fn syntax(&self) -> &SyntaxToken { 1931 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2084 &self.syntax
2085 }
2086} 1932}
2087#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1933#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2088pub struct PubKw { 1934pub struct PubKw {
@@ -2107,9 +1953,7 @@ impl AstToken for PubKw {
2107 None 1953 None
2108 } 1954 }
2109 } 1955 }
2110 fn syntax(&self) -> &SyntaxToken { 1956 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2111 &self.syntax
2112 }
2113} 1957}
2114#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1958#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2115pub struct RefKw { 1959pub struct RefKw {
@@ -2134,9 +1978,7 @@ impl AstToken for RefKw {
2134 None 1978 None
2135 } 1979 }
2136 } 1980 }
2137 fn syntax(&self) -> &SyntaxToken { 1981 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2138 &self.syntax
2139 }
2140} 1982}
2141#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1983#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2142pub struct ReturnKw { 1984pub struct ReturnKw {
@@ -2161,9 +2003,7 @@ impl AstToken for ReturnKw {
2161 None 2003 None
2162 } 2004 }
2163 } 2005 }
2164 fn syntax(&self) -> &SyntaxToken { 2006 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2165 &self.syntax
2166 }
2167} 2007}
2168#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2008#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2169pub struct SelfKw { 2009pub struct SelfKw {
@@ -2188,9 +2028,7 @@ impl AstToken for SelfKw {
2188 None 2028 None
2189 } 2029 }
2190 } 2030 }
2191 fn syntax(&self) -> &SyntaxToken { 2031 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2192 &self.syntax
2193 }
2194} 2032}
2195#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2033#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2196pub struct StaticKw { 2034pub struct StaticKw {
@@ -2215,9 +2053,7 @@ impl AstToken for StaticKw {
2215 None 2053 None
2216 } 2054 }
2217 } 2055 }
2218 fn syntax(&self) -> &SyntaxToken { 2056 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2219 &self.syntax
2220 }
2221} 2057}
2222#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2058#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2223pub struct StructKw { 2059pub struct StructKw {
@@ -2242,9 +2078,7 @@ impl AstToken for StructKw {
2242 None 2078 None
2243 } 2079 }
2244 } 2080 }
2245 fn syntax(&self) -> &SyntaxToken { 2081 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2246 &self.syntax
2247 }
2248} 2082}
2249#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2083#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2250pub struct SuperKw { 2084pub struct SuperKw {
@@ -2269,9 +2103,7 @@ impl AstToken for SuperKw {
2269 None 2103 None
2270 } 2104 }
2271 } 2105 }
2272 fn syntax(&self) -> &SyntaxToken { 2106 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2273 &self.syntax
2274 }
2275} 2107}
2276#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2108#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2277pub struct TraitKw { 2109pub struct TraitKw {
@@ -2296,9 +2128,7 @@ impl AstToken for TraitKw {
2296 None 2128 None
2297 } 2129 }
2298 } 2130 }
2299 fn syntax(&self) -> &SyntaxToken { 2131 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2300 &self.syntax
2301 }
2302} 2132}
2303#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2133#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2304pub struct TrueKw { 2134pub struct TrueKw {
@@ -2323,9 +2153,7 @@ impl AstToken for TrueKw {
2323 None 2153 None
2324 } 2154 }
2325 } 2155 }
2326 fn syntax(&self) -> &SyntaxToken { 2156 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2327 &self.syntax
2328 }
2329} 2157}
2330#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2158#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2331pub struct TryKw { 2159pub struct TryKw {
@@ -2350,9 +2178,7 @@ impl AstToken for TryKw {
2350 None 2178 None
2351 } 2179 }
2352 } 2180 }
2353 fn syntax(&self) -> &SyntaxToken { 2181 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2354 &self.syntax
2355 }
2356} 2182}
2357#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2183#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2358pub struct TypeKw { 2184pub struct TypeKw {
@@ -2377,9 +2203,7 @@ impl AstToken for TypeKw {
2377 None 2203 None
2378 } 2204 }
2379 } 2205 }
2380 fn syntax(&self) -> &SyntaxToken { 2206 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2381 &self.syntax
2382 }
2383} 2207}
2384#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2208#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2385pub struct UnsafeKw { 2209pub struct UnsafeKw {
@@ -2404,9 +2228,7 @@ impl AstToken for UnsafeKw {
2404 None 2228 None
2405 } 2229 }
2406 } 2230 }
2407 fn syntax(&self) -> &SyntaxToken { 2231 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2408 &self.syntax
2409 }
2410} 2232}
2411#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2233#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2412pub struct UseKw { 2234pub struct UseKw {
@@ -2431,9 +2253,7 @@ impl AstToken for UseKw {
2431 None 2253 None
2432 } 2254 }
2433 } 2255 }
2434 fn syntax(&self) -> &SyntaxToken { 2256 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2435 &self.syntax
2436 }
2437} 2257}
2438#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2258#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2439pub struct WhereKw { 2259pub struct WhereKw {
@@ -2458,9 +2278,7 @@ impl AstToken for WhereKw {
2458 None 2278 None
2459 } 2279 }
2460 } 2280 }
2461 fn syntax(&self) -> &SyntaxToken { 2281 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2462 &self.syntax
2463 }
2464} 2282}
2465#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2283#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2466pub struct WhileKw { 2284pub struct WhileKw {
@@ -2485,9 +2303,7 @@ impl AstToken for WhileKw {
2485 None 2303 None
2486 } 2304 }
2487 } 2305 }
2488 fn syntax(&self) -> &SyntaxToken { 2306 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2489 &self.syntax
2490 }
2491} 2307}
2492#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2308#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2493pub struct AutoKw { 2309pub struct AutoKw {
@@ -2512,9 +2328,7 @@ impl AstToken for AutoKw {
2512 None 2328 None
2513 } 2329 }
2514 } 2330 }
2515 fn syntax(&self) -> &SyntaxToken { 2331 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2516 &self.syntax
2517 }
2518} 2332}
2519#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2333#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2520pub struct DefaultKw { 2334pub struct DefaultKw {
@@ -2539,9 +2353,7 @@ impl AstToken for DefaultKw {
2539 None 2353 None
2540 } 2354 }
2541 } 2355 }
2542 fn syntax(&self) -> &SyntaxToken { 2356 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2543 &self.syntax
2544 }
2545} 2357}
2546#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2358#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2547pub struct ExistentialKw { 2359pub struct ExistentialKw {
@@ -2566,9 +2378,7 @@ impl AstToken for ExistentialKw {
2566 None 2378 None
2567 } 2379 }
2568 } 2380 }
2569 fn syntax(&self) -> &SyntaxToken { 2381 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2570 &self.syntax
2571 }
2572} 2382}
2573#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2383#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2574pub struct UnionKw { 2384pub struct UnionKw {
@@ -2593,9 +2403,7 @@ impl AstToken for UnionKw {
2593 None 2403 None
2594 } 2404 }
2595 } 2405 }
2596 fn syntax(&self) -> &SyntaxToken { 2406 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2597 &self.syntax
2598 }
2599} 2407}
2600#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2408#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2601pub struct RawKw { 2409pub struct RawKw {
@@ -2620,9 +2428,7 @@ impl AstToken for RawKw {
2620 None 2428 None
2621 } 2429 }
2622 } 2430 }
2623 fn syntax(&self) -> &SyntaxToken { 2431 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2624 &self.syntax
2625 }
2626} 2432}
2627#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2433#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2628pub struct IntNumber { 2434pub struct IntNumber {
@@ -2647,9 +2453,7 @@ impl AstToken for IntNumber {
2647 None 2453 None
2648 } 2454 }
2649 } 2455 }
2650 fn syntax(&self) -> &SyntaxToken { 2456 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2651 &self.syntax
2652 }
2653} 2457}
2654#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2458#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2655pub struct FloatNumber { 2459pub struct FloatNumber {
@@ -2674,9 +2478,7 @@ impl AstToken for FloatNumber {
2674 None 2478 None
2675 } 2479 }
2676 } 2480 }
2677 fn syntax(&self) -> &SyntaxToken { 2481 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2678 &self.syntax
2679 }
2680} 2482}
2681#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2483#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2682pub struct Char { 2484pub struct Char {
@@ -2701,9 +2503,7 @@ impl AstToken for Char {
2701 None 2503 None
2702 } 2504 }
2703 } 2505 }
2704 fn syntax(&self) -> &SyntaxToken { 2506 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2705 &self.syntax
2706 }
2707} 2507}
2708#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2508#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2709pub struct Byte { 2509pub struct Byte {
@@ -2728,9 +2528,7 @@ impl AstToken for Byte {
2728 None 2528 None
2729 } 2529 }
2730 } 2530 }
2731 fn syntax(&self) -> &SyntaxToken { 2531 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2732 &self.syntax
2733 }
2734} 2532}
2735#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2533#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2736pub struct String { 2534pub struct String {
@@ -2755,9 +2553,7 @@ impl AstToken for String {
2755 None 2553 None
2756 } 2554 }
2757 } 2555 }
2758 fn syntax(&self) -> &SyntaxToken { 2556 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2759 &self.syntax
2760 }
2761} 2557}
2762#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2558#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2763pub struct RawString { 2559pub struct RawString {
@@ -2782,9 +2578,7 @@ impl AstToken for RawString {
2782 None 2578 None
2783 } 2579 }
2784 } 2580 }
2785 fn syntax(&self) -> &SyntaxToken { 2581 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2786 &self.syntax
2787 }
2788} 2582}
2789#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2583#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2790pub struct ByteString { 2584pub struct ByteString {
@@ -2809,9 +2603,7 @@ impl AstToken for ByteString {
2809 None 2603 None
2810 } 2604 }
2811 } 2605 }
2812 fn syntax(&self) -> &SyntaxToken { 2606 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2813 &self.syntax
2814 }
2815} 2607}
2816#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2608#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2817pub struct RawByteString { 2609pub struct RawByteString {
@@ -2836,9 +2628,7 @@ impl AstToken for RawByteString {
2836 None 2628 None
2837 } 2629 }
2838 } 2630 }
2839 fn syntax(&self) -> &SyntaxToken { 2631 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2840 &self.syntax
2841 }
2842} 2632}
2843#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2633#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2844pub struct Error { 2634pub struct Error {
@@ -2863,9 +2653,7 @@ impl AstToken for Error {
2863 None 2653 None
2864 } 2654 }
2865 } 2655 }
2866 fn syntax(&self) -> &SyntaxToken { 2656 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2867 &self.syntax
2868 }
2869} 2657}
2870#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2658#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2871pub struct Ident { 2659pub struct Ident {
@@ -2890,9 +2678,7 @@ impl AstToken for Ident {
2890 None 2678 None
2891 } 2679 }
2892 } 2680 }
2893 fn syntax(&self) -> &SyntaxToken { 2681 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2894 &self.syntax
2895 }
2896} 2682}
2897#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2683#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2898pub struct Whitespace { 2684pub struct Whitespace {
@@ -2917,9 +2703,7 @@ impl AstToken for Whitespace {
2917 None 2703 None
2918 } 2704 }
2919 } 2705 }
2920 fn syntax(&self) -> &SyntaxToken { 2706 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2921 &self.syntax
2922 }
2923} 2707}
2924#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2708#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2925pub struct Lifetime { 2709pub struct Lifetime {
@@ -2944,9 +2728,7 @@ impl AstToken for Lifetime {
2944 None 2728 None
2945 } 2729 }
2946 } 2730 }
2947 fn syntax(&self) -> &SyntaxToken { 2731 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2948 &self.syntax
2949 }
2950} 2732}
2951#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2733#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2952pub struct Comment { 2734pub struct Comment {
@@ -2971,9 +2753,7 @@ impl AstToken for Comment {
2971 None 2753 None
2972 } 2754 }
2973 } 2755 }
2974 fn syntax(&self) -> &SyntaxToken { 2756 fn syntax(&self) -> &SyntaxToken { &self.syntax }
2975 &self.syntax
2976 }
2977} 2757}
2978#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2758#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2979pub struct Shebang { 2759pub struct Shebang {
@@ -2998,9 +2778,7 @@ impl AstToken for Shebang {
2998 None 2778 None
2999 } 2779 }
3000 } 2780 }
3001 fn syntax(&self) -> &SyntaxToken { 2781 fn syntax(&self) -> &SyntaxToken { &self.syntax }
3002 &self.syntax
3003 }
3004} 2782}
3005#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2783#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3006pub struct LDollar { 2784pub struct LDollar {
@@ -3025,9 +2803,7 @@ impl AstToken for LDollar {
3025 None 2803 None
3026 } 2804 }
3027 } 2805 }
3028 fn syntax(&self) -> &SyntaxToken { 2806 fn syntax(&self) -> &SyntaxToken { &self.syntax }
3029 &self.syntax
3030 }
3031} 2807}
3032#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2808#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3033pub struct RDollar { 2809pub struct RDollar {
@@ -3052,9 +2828,7 @@ impl AstToken for RDollar {
3052 None 2828 None
3053 } 2829 }
3054 } 2830 }
3055 fn syntax(&self) -> &SyntaxToken { 2831 fn syntax(&self) -> &SyntaxToken { &self.syntax }
3056 &self.syntax
3057 }
3058} 2832}
3059#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2833#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3060pub enum LeftDelimiter { 2834pub enum LeftDelimiter {
@@ -3063,19 +2837,13 @@ pub enum LeftDelimiter {
3063 LCurly(LCurly), 2837 LCurly(LCurly),
3064} 2838}
3065impl From<LParen> for LeftDelimiter { 2839impl From<LParen> for LeftDelimiter {
3066 fn from(node: LParen) -> LeftDelimiter { 2840 fn from(node: LParen) -> LeftDelimiter { LeftDelimiter::LParen(node) }
3067 LeftDelimiter::LParen(node)
3068 }
3069} 2841}
3070impl From<LBrack> for LeftDelimiter { 2842impl From<LBrack> for LeftDelimiter {
3071 fn from(node: LBrack) -> LeftDelimiter { 2843 fn from(node: LBrack) -> LeftDelimiter { LeftDelimiter::LBrack(node) }
3072 LeftDelimiter::LBrack(node)
3073 }
3074} 2844}
3075impl From<LCurly> for LeftDelimiter { 2845impl From<LCurly> for LeftDelimiter {
3076 fn from(node: LCurly) -> LeftDelimiter { 2846 fn from(node: LCurly) -> LeftDelimiter { LeftDelimiter::LCurly(node) }
3077 LeftDelimiter::LCurly(node)
3078 }
3079} 2847}
3080impl std::fmt::Display for LeftDelimiter { 2848impl std::fmt::Display for LeftDelimiter {
3081 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 2849 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -3113,19 +2881,13 @@ pub enum RightDelimiter {
3113 RCurly(RCurly), 2881 RCurly(RCurly),
3114} 2882}
3115impl From<RParen> for RightDelimiter { 2883impl From<RParen> for RightDelimiter {
3116 fn from(node: RParen) -> RightDelimiter { 2884 fn from(node: RParen) -> RightDelimiter { RightDelimiter::RParen(node) }
3117 RightDelimiter::RParen(node)
3118 }
3119} 2885}
3120impl From<RBrack> for RightDelimiter { 2886impl From<RBrack> for RightDelimiter {
3121 fn from(node: RBrack) -> RightDelimiter { 2887 fn from(node: RBrack) -> RightDelimiter { RightDelimiter::RBrack(node) }
3122 RightDelimiter::RBrack(node)
3123 }
3124} 2888}
3125impl From<RCurly> for RightDelimiter { 2889impl From<RCurly> for RightDelimiter {
3126 fn from(node: RCurly) -> RightDelimiter { 2890 fn from(node: RCurly) -> RightDelimiter { RightDelimiter::RCurly(node) }
3127 RightDelimiter::RCurly(node)
3128 }
3129} 2891}
3130impl std::fmt::Display for RightDelimiter { 2892impl std::fmt::Display for RightDelimiter {
3131 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 2893 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -3163,19 +2925,13 @@ pub enum RangeSeparator {
3163 Dotdoteq(Dotdoteq), 2925 Dotdoteq(Dotdoteq),
3164} 2926}
3165impl From<Dotdot> for RangeSeparator { 2927impl From<Dotdot> for RangeSeparator {
3166 fn from(node: Dotdot) -> RangeSeparator { 2928 fn from(node: Dotdot) -> RangeSeparator { RangeSeparator::Dotdot(node) }
3167 RangeSeparator::Dotdot(node)
3168 }
3169} 2929}
3170impl From<Dotdotdot> for RangeSeparator { 2930impl From<Dotdotdot> for RangeSeparator {
3171 fn from(node: Dotdotdot) -> RangeSeparator { 2931 fn from(node: Dotdotdot) -> RangeSeparator { RangeSeparator::Dotdotdot(node) }
3172 RangeSeparator::Dotdotdot(node)
3173 }
3174} 2932}
3175impl From<Dotdoteq> for RangeSeparator { 2933impl From<Dotdoteq> for RangeSeparator {
3176 fn from(node: Dotdoteq) -> RangeSeparator { 2934 fn from(node: Dotdoteq) -> RangeSeparator { RangeSeparator::Dotdoteq(node) }
3177 RangeSeparator::Dotdoteq(node)
3178 }
3179} 2935}
3180impl std::fmt::Display for RangeSeparator { 2936impl std::fmt::Display for RangeSeparator {
3181 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 2937 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -3239,149 +2995,91 @@ pub enum BinOp {
3239 Careteq(Careteq), 2995 Careteq(Careteq),
3240} 2996}
3241impl From<Pipepipe> for BinOp { 2997impl From<Pipepipe> for BinOp {
3242 fn from(node: Pipepipe) -> BinOp { 2998 fn from(node: Pipepipe) -> BinOp { BinOp::Pipepipe(node) }
3243 BinOp::Pipepipe(node)
3244 }
3245} 2999}
3246impl From<Ampamp> for BinOp { 3000impl From<Ampamp> for BinOp {
3247 fn from(node: Ampamp) -> BinOp { 3001 fn from(node: Ampamp) -> BinOp { BinOp::Ampamp(node) }
3248 BinOp::Ampamp(node)
3249 }
3250} 3002}
3251impl From<Eqeq> for BinOp { 3003impl From<Eqeq> for BinOp {
3252 fn from(node: Eqeq) -> BinOp { 3004 fn from(node: Eqeq) -> BinOp { BinOp::Eqeq(node) }
3253 BinOp::Eqeq(node)
3254 }
3255} 3005}
3256impl From<Neq> for BinOp { 3006impl From<Neq> for BinOp {
3257 fn from(node: Neq) -> BinOp { 3007 fn from(node: Neq) -> BinOp { BinOp::Neq(node) }
3258 BinOp::Neq(node)
3259 }
3260} 3008}
3261impl From<Lteq> for BinOp { 3009impl From<Lteq> for BinOp {
3262 fn from(node: Lteq) -> BinOp { 3010 fn from(node: Lteq) -> BinOp { BinOp::Lteq(node) }
3263 BinOp::Lteq(node)
3264 }
3265} 3011}
3266impl From<Gteq> for BinOp { 3012impl From<Gteq> for BinOp {
3267 fn from(node: Gteq) -> BinOp { 3013 fn from(node: Gteq) -> BinOp { BinOp::Gteq(node) }
3268 BinOp::Gteq(node)
3269 }
3270} 3014}
3271impl From<LAngle> for BinOp { 3015impl From<LAngle> for BinOp {
3272 fn from(node: LAngle) -> BinOp { 3016 fn from(node: LAngle) -> BinOp { BinOp::LAngle(node) }
3273 BinOp::LAngle(node)
3274 }
3275} 3017}
3276impl From<RAngle> for BinOp { 3018impl From<RAngle> for BinOp {
3277 fn from(node: RAngle) -> BinOp { 3019 fn from(node: RAngle) -> BinOp { BinOp::RAngle(node) }
3278 BinOp::RAngle(node)
3279 }
3280} 3020}
3281impl From<Plus> for BinOp { 3021impl From<Plus> for BinOp {
3282 fn from(node: Plus) -> BinOp { 3022 fn from(node: Plus) -> BinOp { BinOp::Plus(node) }
3283 BinOp::Plus(node)
3284 }
3285} 3023}
3286impl From<Star> for BinOp { 3024impl From<Star> for BinOp {
3287 fn from(node: Star) -> BinOp { 3025 fn from(node: Star) -> BinOp { BinOp::Star(node) }
3288 BinOp::Star(node)
3289 }
3290} 3026}
3291impl From<Minus> for BinOp { 3027impl From<Minus> for BinOp {
3292 fn from(node: Minus) -> BinOp { 3028 fn from(node: Minus) -> BinOp { BinOp::Minus(node) }
3293 BinOp::Minus(node)
3294 }
3295} 3029}
3296impl From<Slash> for BinOp { 3030impl From<Slash> for BinOp {
3297 fn from(node: Slash) -> BinOp { 3031 fn from(node: Slash) -> BinOp { BinOp::Slash(node) }
3298 BinOp::Slash(node)
3299 }
3300} 3032}
3301impl From<Percent> for BinOp { 3033impl From<Percent> for BinOp {
3302 fn from(node: Percent) -> BinOp { 3034 fn from(node: Percent) -> BinOp { BinOp::Percent(node) }
3303 BinOp::Percent(node)
3304 }
3305} 3035}
3306impl From<Shl> for BinOp { 3036impl From<Shl> for BinOp {
3307 fn from(node: Shl) -> BinOp { 3037 fn from(node: Shl) -> BinOp { BinOp::Shl(node) }
3308 BinOp::Shl(node)
3309 }
3310} 3038}
3311impl From<Shr> for BinOp { 3039impl From<Shr> for BinOp {
3312 fn from(node: Shr) -> BinOp { 3040 fn from(node: Shr) -> BinOp { BinOp::Shr(node) }
3313 BinOp::Shr(node)
3314 }
3315} 3041}
3316impl From<Caret> for BinOp { 3042impl From<Caret> for BinOp {
3317 fn from(node: Caret) -> BinOp { 3043 fn from(node: Caret) -> BinOp { BinOp::Caret(node) }
3318 BinOp::Caret(node)
3319 }
3320} 3044}
3321impl From<Pipe> for BinOp { 3045impl From<Pipe> for BinOp {
3322 fn from(node: Pipe) -> BinOp { 3046 fn from(node: Pipe) -> BinOp { BinOp::Pipe(node) }
3323 BinOp::Pipe(node)
3324 }
3325} 3047}
3326impl From<Amp> for BinOp { 3048impl From<Amp> for BinOp {
3327 fn from(node: Amp) -> BinOp { 3049 fn from(node: Amp) -> BinOp { BinOp::Amp(node) }
3328 BinOp::Amp(node)
3329 }
3330} 3050}
3331impl From<Eq> for BinOp { 3051impl From<Eq> for BinOp {
3332 fn from(node: Eq) -> BinOp { 3052 fn from(node: Eq) -> BinOp { BinOp::Eq(node) }
3333 BinOp::Eq(node)
3334 }
3335} 3053}
3336impl From<Pluseq> for BinOp { 3054impl From<Pluseq> for BinOp {
3337 fn from(node: Pluseq) -> BinOp { 3055 fn from(node: Pluseq) -> BinOp { BinOp::Pluseq(node) }
3338 BinOp::Pluseq(node)
3339 }
3340} 3056}
3341impl From<Slasheq> for BinOp { 3057impl From<Slasheq> for BinOp {
3342 fn from(node: Slasheq) -> BinOp { 3058 fn from(node: Slasheq) -> BinOp { BinOp::Slasheq(node) }
3343 BinOp::Slasheq(node)
3344 }
3345} 3059}
3346impl From<Stareq> for BinOp { 3060impl From<Stareq> for BinOp {
3347 fn from(node: Stareq) -> BinOp { 3061 fn from(node: Stareq) -> BinOp { BinOp::Stareq(node) }
3348 BinOp::Stareq(node)
3349 }
3350} 3062}
3351impl From<Percenteq> for BinOp { 3063impl From<Percenteq> for BinOp {
3352 fn from(node: Percenteq) -> BinOp { 3064 fn from(node: Percenteq) -> BinOp { BinOp::Percenteq(node) }
3353 BinOp::Percenteq(node)
3354 }
3355} 3065}
3356impl From<Shreq> for BinOp { 3066impl From<Shreq> for BinOp {
3357 fn from(node: Shreq) -> BinOp { 3067 fn from(node: Shreq) -> BinOp { BinOp::Shreq(node) }
3358 BinOp::Shreq(node)
3359 }
3360} 3068}
3361impl From<Shleq> for BinOp { 3069impl From<Shleq> for BinOp {
3362 fn from(node: Shleq) -> BinOp { 3070 fn from(node: Shleq) -> BinOp { BinOp::Shleq(node) }
3363 BinOp::Shleq(node)
3364 }
3365} 3071}
3366impl From<Minuseq> for BinOp { 3072impl From<Minuseq> for BinOp {
3367 fn from(node: Minuseq) -> BinOp { 3073 fn from(node: Minuseq) -> BinOp { BinOp::Minuseq(node) }
3368 BinOp::Minuseq(node)
3369 }
3370} 3074}
3371impl From<Pipeeq> for BinOp { 3075impl From<Pipeeq> for BinOp {
3372 fn from(node: Pipeeq) -> BinOp { 3076 fn from(node: Pipeeq) -> BinOp { BinOp::Pipeeq(node) }
3373 BinOp::Pipeeq(node)
3374 }
3375} 3077}
3376impl From<Ampeq> for BinOp { 3078impl From<Ampeq> for BinOp {
3377 fn from(node: Ampeq) -> BinOp { 3079 fn from(node: Ampeq) -> BinOp { BinOp::Ampeq(node) }
3378 BinOp::Ampeq(node)
3379 }
3380} 3080}
3381impl From<Careteq> for BinOp { 3081impl From<Careteq> for BinOp {
3382 fn from(node: Careteq) -> BinOp { 3082 fn from(node: Careteq) -> BinOp { BinOp::Careteq(node) }
3383 BinOp::Careteq(node)
3384 }
3385} 3083}
3386impl std::fmt::Display for BinOp { 3084impl std::fmt::Display for BinOp {
3387 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 3085 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -3473,19 +3171,13 @@ pub enum PrefixOp {
3473 Star(Star), 3171 Star(Star),
3474} 3172}
3475impl From<Minus> for PrefixOp { 3173impl From<Minus> for PrefixOp {
3476 fn from(node: Minus) -> PrefixOp { 3174 fn from(node: Minus) -> PrefixOp { PrefixOp::Minus(node) }
3477 PrefixOp::Minus(node)
3478 }
3479} 3175}
3480impl From<Excl> for PrefixOp { 3176impl From<Excl> for PrefixOp {
3481 fn from(node: Excl) -> PrefixOp { 3177 fn from(node: Excl) -> PrefixOp { PrefixOp::Excl(node) }
3482 PrefixOp::Excl(node)
3483 }
3484} 3178}
3485impl From<Star> for PrefixOp { 3179impl From<Star> for PrefixOp {
3486 fn from(node: Star) -> PrefixOp { 3180 fn from(node: Star) -> PrefixOp { PrefixOp::Star(node) }
3487 PrefixOp::Star(node)
3488 }
3489} 3181}
3490impl std::fmt::Display for PrefixOp { 3182impl std::fmt::Display for PrefixOp {
3491 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 3183 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -3522,14 +3214,10 @@ pub enum RangeOp {
3522 Dotdoteq(Dotdoteq), 3214 Dotdoteq(Dotdoteq),
3523} 3215}
3524impl From<Dotdot> for RangeOp { 3216impl From<Dotdot> for RangeOp {
3525 fn from(node: Dotdot) -> RangeOp { 3217 fn from(node: Dotdot) -> RangeOp { RangeOp::Dotdot(node) }
3526 RangeOp::Dotdot(node)
3527 }
3528} 3218}
3529impl From<Dotdoteq> for RangeOp { 3219impl From<Dotdoteq> for RangeOp {
3530 fn from(node: Dotdoteq) -> RangeOp { 3220 fn from(node: Dotdoteq) -> RangeOp { RangeOp::Dotdoteq(node) }
3531 RangeOp::Dotdoteq(node)
3532 }
3533} 3221}
3534impl std::fmt::Display for RangeOp { 3222impl std::fmt::Display for RangeOp {
3535 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 3223 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -3572,54 +3260,34 @@ pub enum LiteralToken {
3572 Byte(Byte), 3260 Byte(Byte),
3573} 3261}
3574impl From<IntNumber> for LiteralToken { 3262impl From<IntNumber> for LiteralToken {
3575 fn from(node: IntNumber) -> LiteralToken { 3263 fn from(node: IntNumber) -> LiteralToken { LiteralToken::IntNumber(node) }
3576 LiteralToken::IntNumber(node)
3577 }
3578} 3264}
3579impl From<FloatNumber> for LiteralToken { 3265impl From<FloatNumber> for LiteralToken {
3580 fn from(node: FloatNumber) -> LiteralToken { 3266 fn from(node: FloatNumber) -> LiteralToken { LiteralToken::FloatNumber(node) }
3581 LiteralToken::FloatNumber(node)
3582 }
3583} 3267}
3584impl From<String> for LiteralToken { 3268impl From<String> for LiteralToken {
3585 fn from(node: String) -> LiteralToken { 3269 fn from(node: String) -> LiteralToken { LiteralToken::String(node) }
3586 LiteralToken::String(node)
3587 }
3588} 3270}
3589impl From<RawString> for LiteralToken { 3271impl From<RawString> for LiteralToken {
3590 fn from(node: RawString) -> LiteralToken { 3272 fn from(node: RawString) -> LiteralToken { LiteralToken::RawString(node) }
3591 LiteralToken::RawString(node)
3592 }
3593} 3273}
3594impl From<TrueKw> for LiteralToken { 3274impl From<TrueKw> for LiteralToken {
3595 fn from(node: TrueKw) -> LiteralToken { 3275 fn from(node: TrueKw) -> LiteralToken { LiteralToken::TrueKw(node) }
3596 LiteralToken::TrueKw(node)
3597 }
3598} 3276}
3599impl From<FalseKw> for LiteralToken { 3277impl From<FalseKw> for LiteralToken {
3600 fn from(node: FalseKw) -> LiteralToken { 3278 fn from(node: FalseKw) -> LiteralToken { LiteralToken::FalseKw(node) }
3601 LiteralToken::FalseKw(node)
3602 }
3603} 3279}
3604impl From<ByteString> for LiteralToken { 3280impl From<ByteString> for LiteralToken {
3605 fn from(node: ByteString) -> LiteralToken { 3281 fn from(node: ByteString) -> LiteralToken { LiteralToken::ByteString(node) }
3606 LiteralToken::ByteString(node)
3607 }
3608} 3282}
3609impl From<RawByteString> for LiteralToken { 3283impl From<RawByteString> for LiteralToken {
3610 fn from(node: RawByteString) -> LiteralToken { 3284 fn from(node: RawByteString) -> LiteralToken { LiteralToken::RawByteString(node) }
3611 LiteralToken::RawByteString(node)
3612 }
3613} 3285}
3614impl From<Char> for LiteralToken { 3286impl From<Char> for LiteralToken {
3615 fn from(node: Char) -> LiteralToken { 3287 fn from(node: Char) -> LiteralToken { LiteralToken::Char(node) }
3616 LiteralToken::Char(node)
3617 }
3618} 3288}
3619impl From<Byte> for LiteralToken { 3289impl From<Byte> for LiteralToken {
3620 fn from(node: Byte) -> LiteralToken { 3290 fn from(node: Byte) -> LiteralToken { LiteralToken::Byte(node) }
3621 LiteralToken::Byte(node)
3622 }
3623} 3291}
3624impl std::fmt::Display for LiteralToken { 3292impl std::fmt::Display for LiteralToken {
3625 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 3293 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -3671,14 +3339,10 @@ pub enum NameRefToken {
3671 IntNumber(IntNumber), 3339 IntNumber(IntNumber),
3672} 3340}
3673impl From<Ident> for NameRefToken { 3341impl From<Ident> for NameRefToken {
3674 fn from(node: Ident) -> NameRefToken { 3342 fn from(node: Ident) -> NameRefToken { NameRefToken::Ident(node) }
3675 NameRefToken::Ident(node)
3676 }
3677} 3343}
3678impl From<IntNumber> for NameRefToken { 3344impl From<IntNumber> for NameRefToken {
3679 fn from(node: IntNumber) -> NameRefToken { 3345 fn from(node: IntNumber) -> NameRefToken { NameRefToken::IntNumber(node) }
3680 NameRefToken::IntNumber(node)
3681 }
3682} 3346}
3683impl std::fmt::Display for NameRefToken { 3347impl std::fmt::Display for NameRefToken {
3684 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 3348 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
diff --git a/xtask/src/lib.rs b/xtask/src/lib.rs
index 9d087daa2..ec824a518 100644
--- a/xtask/src/lib.rs
+++ b/xtask/src/lib.rs
@@ -67,6 +67,7 @@ fn reformat(text: impl std::fmt::Display) -> Result<String> {
67 let mut rustfmt = Command::new("rustup") 67 let mut rustfmt = Command::new("rustup")
68 .args(&["run", TOOLCHAIN, "--", "rustfmt", "--config-path"]) 68 .args(&["run", TOOLCHAIN, "--", "rustfmt", "--config-path"])
69 .arg(project_root().join("rustfmt.toml")) 69 .arg(project_root().join("rustfmt.toml"))
70 .args(&["--config", "fn_single_line=true"])
70 .stdin(Stdio::piped()) 71 .stdin(Stdio::piped())
71 .stdout(Stdio::piped()) 72 .stdout(Stdio::piped())
72 .spawn()?; 73 .spawn()?;