diff options
Diffstat (limited to 'crates/libsyntax2/src/ast/generated.rs')
-rw-r--r-- | crates/libsyntax2/src/ast/generated.rs | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/crates/libsyntax2/src/ast/generated.rs b/crates/libsyntax2/src/ast/generated.rs index 0651da26d..d0e07fddc 100644 --- a/crates/libsyntax2/src/ast/generated.rs +++ b/crates/libsyntax2/src/ast/generated.rs | |||
@@ -64,6 +64,7 @@ impl<'a> AstNode<'a> for ConstDef<'a> { | |||
64 | } | 64 | } |
65 | 65 | ||
66 | impl<'a> ast::NameOwner<'a> for ConstDef<'a> {} | 66 | impl<'a> ast::NameOwner<'a> for ConstDef<'a> {} |
67 | impl<'a> ast::TypeParamsOwner<'a> for ConstDef<'a> {} | ||
67 | impl<'a> ast::AttrsOwner<'a> for ConstDef<'a> {} | 68 | impl<'a> ast::AttrsOwner<'a> for ConstDef<'a> {} |
68 | impl<'a> ConstDef<'a> {} | 69 | impl<'a> ConstDef<'a> {} |
69 | 70 | ||
@@ -102,6 +103,7 @@ impl<'a> AstNode<'a> for EnumDef<'a> { | |||
102 | } | 103 | } |
103 | 104 | ||
104 | impl<'a> ast::NameOwner<'a> for EnumDef<'a> {} | 105 | impl<'a> ast::NameOwner<'a> for EnumDef<'a> {} |
106 | impl<'a> ast::TypeParamsOwner<'a> for EnumDef<'a> {} | ||
105 | impl<'a> ast::AttrsOwner<'a> for EnumDef<'a> {} | 107 | impl<'a> ast::AttrsOwner<'a> for EnumDef<'a> {} |
106 | impl<'a> EnumDef<'a> {} | 108 | impl<'a> EnumDef<'a> {} |
107 | 109 | ||
@@ -152,6 +154,7 @@ impl<'a> AstNode<'a> for FnDef<'a> { | |||
152 | } | 154 | } |
153 | 155 | ||
154 | impl<'a> ast::NameOwner<'a> for FnDef<'a> {} | 156 | impl<'a> ast::NameOwner<'a> for FnDef<'a> {} |
157 | impl<'a> ast::TypeParamsOwner<'a> for FnDef<'a> {} | ||
155 | impl<'a> ast::AttrsOwner<'a> for FnDef<'a> {} | 158 | impl<'a> ast::AttrsOwner<'a> for FnDef<'a> {} |
156 | impl<'a> FnDef<'a> {} | 159 | impl<'a> FnDef<'a> {} |
157 | 160 | ||
@@ -351,6 +354,7 @@ impl<'a> AstNode<'a> for NominalDef<'a> { | |||
351 | } | 354 | } |
352 | 355 | ||
353 | impl<'a> ast::AttrsOwner<'a> for NominalDef<'a> {} | 356 | impl<'a> ast::AttrsOwner<'a> for NominalDef<'a> {} |
357 | impl<'a> ast::TypeParamsOwner<'a> for NominalDef<'a> {} | ||
354 | impl<'a> NominalDef<'a> {} | 358 | impl<'a> NominalDef<'a> {} |
355 | 359 | ||
356 | // ParenType | 360 | // ParenType |
@@ -478,6 +482,7 @@ impl<'a> AstNode<'a> for StaticDef<'a> { | |||
478 | } | 482 | } |
479 | 483 | ||
480 | impl<'a> ast::NameOwner<'a> for StaticDef<'a> {} | 484 | impl<'a> ast::NameOwner<'a> for StaticDef<'a> {} |
485 | impl<'a> ast::TypeParamsOwner<'a> for StaticDef<'a> {} | ||
481 | impl<'a> ast::AttrsOwner<'a> for StaticDef<'a> {} | 486 | impl<'a> ast::AttrsOwner<'a> for StaticDef<'a> {} |
482 | impl<'a> StaticDef<'a> {} | 487 | impl<'a> StaticDef<'a> {} |
483 | 488 | ||
@@ -498,6 +503,7 @@ impl<'a> AstNode<'a> for StructDef<'a> { | |||
498 | } | 503 | } |
499 | 504 | ||
500 | impl<'a> ast::NameOwner<'a> for StructDef<'a> {} | 505 | impl<'a> ast::NameOwner<'a> for StructDef<'a> {} |
506 | impl<'a> ast::TypeParamsOwner<'a> for StructDef<'a> {} | ||
501 | impl<'a> ast::AttrsOwner<'a> for StructDef<'a> {} | 507 | impl<'a> ast::AttrsOwner<'a> for StructDef<'a> {} |
502 | impl<'a> StructDef<'a> { | 508 | impl<'a> StructDef<'a> { |
503 | pub fn fields(self) -> impl Iterator<Item = NamedField<'a>> + 'a { | 509 | pub fn fields(self) -> impl Iterator<Item = NamedField<'a>> + 'a { |
@@ -580,9 +586,28 @@ impl<'a> AstNode<'a> for TypeDef<'a> { | |||
580 | } | 586 | } |
581 | 587 | ||
582 | impl<'a> ast::NameOwner<'a> for TypeDef<'a> {} | 588 | impl<'a> ast::NameOwner<'a> for TypeDef<'a> {} |
589 | impl<'a> ast::TypeParamsOwner<'a> for TypeDef<'a> {} | ||
583 | impl<'a> ast::AttrsOwner<'a> for TypeDef<'a> {} | 590 | impl<'a> ast::AttrsOwner<'a> for TypeDef<'a> {} |
584 | impl<'a> TypeDef<'a> {} | 591 | impl<'a> TypeDef<'a> {} |
585 | 592 | ||
593 | // TypeParamList | ||
594 | #[derive(Debug, Clone, Copy)] | ||
595 | pub struct TypeParamList<'a> { | ||
596 | syntax: SyntaxNodeRef<'a>, | ||
597 | } | ||
598 | |||
599 | impl<'a> AstNode<'a> for TypeParamList<'a> { | ||
600 | fn cast(syntax: SyntaxNodeRef<'a>) -> Option<Self> { | ||
601 | match syntax.kind() { | ||
602 | TYPE_PARAM_LIST => Some(TypeParamList { syntax }), | ||
603 | _ => None, | ||
604 | } | ||
605 | } | ||
606 | fn syntax(self) -> SyntaxNodeRef<'a> { self.syntax } | ||
607 | } | ||
608 | |||
609 | impl<'a> TypeParamList<'a> {} | ||
610 | |||
586 | // TypeRef | 611 | // TypeRef |
587 | #[derive(Debug, Clone, Copy)] | 612 | #[derive(Debug, Clone, Copy)] |
588 | pub enum TypeRef<'a> { | 613 | pub enum TypeRef<'a> { |
@@ -641,21 +666,21 @@ impl<'a> AstNode<'a> for TypeRef<'a> { | |||
641 | 666 | ||
642 | impl<'a> TypeRef<'a> {} | 667 | impl<'a> TypeRef<'a> {} |
643 | 668 | ||
644 | // Whitespace | 669 | // WhereClause |
645 | #[derive(Debug, Clone, Copy)] | 670 | #[derive(Debug, Clone, Copy)] |
646 | pub struct Whitespace<'a> { | 671 | pub struct WhereClause<'a> { |
647 | syntax: SyntaxNodeRef<'a>, | 672 | syntax: SyntaxNodeRef<'a>, |
648 | } | 673 | } |
649 | 674 | ||
650 | impl<'a> AstNode<'a> for Whitespace<'a> { | 675 | impl<'a> AstNode<'a> for WhereClause<'a> { |
651 | fn cast(syntax: SyntaxNodeRef<'a>) -> Option<Self> { | 676 | fn cast(syntax: SyntaxNodeRef<'a>) -> Option<Self> { |
652 | match syntax.kind() { | 677 | match syntax.kind() { |
653 | WHITESPACE => Some(Whitespace { syntax }), | 678 | WHERE_CLAUSE => Some(WhereClause { syntax }), |
654 | _ => None, | 679 | _ => None, |
655 | } | 680 | } |
656 | } | 681 | } |
657 | fn syntax(self) -> SyntaxNodeRef<'a> { self.syntax } | 682 | fn syntax(self) -> SyntaxNodeRef<'a> { self.syntax } |
658 | } | 683 | } |
659 | 684 | ||
660 | impl<'a> Whitespace<'a> {} | 685 | impl<'a> WhereClause<'a> {} |
661 | 686 | ||