diff options
Diffstat (limited to 'crates/ra_syntax/src/ast/generated.rs')
-rw-r--r-- | crates/ra_syntax/src/ast/generated.rs | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index 7da19d782..3ace6533c 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs | |||
@@ -2248,6 +2248,7 @@ impl ToOwned for NamedFieldDef { | |||
2248 | impl ast::VisibilityOwner for NamedFieldDef {} | 2248 | impl ast::VisibilityOwner for NamedFieldDef {} |
2249 | impl ast::NameOwner for NamedFieldDef {} | 2249 | impl ast::NameOwner for NamedFieldDef {} |
2250 | impl ast::AttrsOwner for NamedFieldDef {} | 2250 | impl ast::AttrsOwner for NamedFieldDef {} |
2251 | impl ast::DocCommentsOwner for NamedFieldDef {} | ||
2251 | impl NamedFieldDef { | 2252 | impl NamedFieldDef { |
2252 | pub fn type_ref(&self) -> Option<&TypeRef> { | 2253 | pub fn type_ref(&self) -> Option<&TypeRef> { |
2253 | super::child_opt(self) | 2254 | super::child_opt(self) |
@@ -2850,68 +2851,68 @@ impl PointerType { | |||
2850 | } | 2851 | } |
2851 | } | 2852 | } |
2852 | 2853 | ||
2853 | // PosField | 2854 | // PosFieldDef |
2854 | #[derive(Debug, PartialEq, Eq, Hash)] | 2855 | #[derive(Debug, PartialEq, Eq, Hash)] |
2855 | #[repr(transparent)] | 2856 | #[repr(transparent)] |
2856 | pub struct PosField { | 2857 | pub struct PosFieldDef { |
2857 | pub(crate) syntax: SyntaxNode, | 2858 | pub(crate) syntax: SyntaxNode, |
2858 | } | 2859 | } |
2859 | unsafe impl TransparentNewType for PosField { | 2860 | unsafe impl TransparentNewType for PosFieldDef { |
2860 | type Repr = rowan::SyntaxNode<RaTypes>; | 2861 | type Repr = rowan::SyntaxNode<RaTypes>; |
2861 | } | 2862 | } |
2862 | 2863 | ||
2863 | impl AstNode for PosField { | 2864 | impl AstNode for PosFieldDef { |
2864 | fn cast(syntax: &SyntaxNode) -> Option<&Self> { | 2865 | fn cast(syntax: &SyntaxNode) -> Option<&Self> { |
2865 | match syntax.kind() { | 2866 | match syntax.kind() { |
2866 | POS_FIELD => Some(PosField::from_repr(syntax.into_repr())), | 2867 | POS_FIELD_DEF => Some(PosFieldDef::from_repr(syntax.into_repr())), |
2867 | _ => None, | 2868 | _ => None, |
2868 | } | 2869 | } |
2869 | } | 2870 | } |
2870 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2871 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2871 | } | 2872 | } |
2872 | 2873 | ||
2873 | impl ToOwned for PosField { | 2874 | impl ToOwned for PosFieldDef { |
2874 | type Owned = TreeArc<PosField>; | 2875 | type Owned = TreeArc<PosFieldDef>; |
2875 | fn to_owned(&self) -> TreeArc<PosField> { TreeArc::cast(self.syntax.to_owned()) } | 2876 | fn to_owned(&self) -> TreeArc<PosFieldDef> { TreeArc::cast(self.syntax.to_owned()) } |
2876 | } | 2877 | } |
2877 | 2878 | ||
2878 | 2879 | ||
2879 | impl ast::VisibilityOwner for PosField {} | 2880 | impl ast::VisibilityOwner for PosFieldDef {} |
2880 | impl ast::AttrsOwner for PosField {} | 2881 | impl ast::AttrsOwner for PosFieldDef {} |
2881 | impl PosField { | 2882 | impl PosFieldDef { |
2882 | pub fn type_ref(&self) -> Option<&TypeRef> { | 2883 | pub fn type_ref(&self) -> Option<&TypeRef> { |
2883 | super::child_opt(self) | 2884 | super::child_opt(self) |
2884 | } | 2885 | } |
2885 | } | 2886 | } |
2886 | 2887 | ||
2887 | // PosFieldList | 2888 | // PosFieldDefList |
2888 | #[derive(Debug, PartialEq, Eq, Hash)] | 2889 | #[derive(Debug, PartialEq, Eq, Hash)] |
2889 | #[repr(transparent)] | 2890 | #[repr(transparent)] |
2890 | pub struct PosFieldList { | 2891 | pub struct PosFieldDefList { |
2891 | pub(crate) syntax: SyntaxNode, | 2892 | pub(crate) syntax: SyntaxNode, |
2892 | } | 2893 | } |
2893 | unsafe impl TransparentNewType for PosFieldList { | 2894 | unsafe impl TransparentNewType for PosFieldDefList { |
2894 | type Repr = rowan::SyntaxNode<RaTypes>; | 2895 | type Repr = rowan::SyntaxNode<RaTypes>; |
2895 | } | 2896 | } |
2896 | 2897 | ||
2897 | impl AstNode for PosFieldList { | 2898 | impl AstNode for PosFieldDefList { |
2898 | fn cast(syntax: &SyntaxNode) -> Option<&Self> { | 2899 | fn cast(syntax: &SyntaxNode) -> Option<&Self> { |
2899 | match syntax.kind() { | 2900 | match syntax.kind() { |
2900 | POS_FIELD_LIST => Some(PosFieldList::from_repr(syntax.into_repr())), | 2901 | POS_FIELD_DEF_LIST => Some(PosFieldDefList::from_repr(syntax.into_repr())), |
2901 | _ => None, | 2902 | _ => None, |
2902 | } | 2903 | } |
2903 | } | 2904 | } |
2904 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2905 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2905 | } | 2906 | } |
2906 | 2907 | ||
2907 | impl ToOwned for PosFieldList { | 2908 | impl ToOwned for PosFieldDefList { |
2908 | type Owned = TreeArc<PosFieldList>; | 2909 | type Owned = TreeArc<PosFieldDefList>; |
2909 | fn to_owned(&self) -> TreeArc<PosFieldList> { TreeArc::cast(self.syntax.to_owned()) } | 2910 | fn to_owned(&self) -> TreeArc<PosFieldDefList> { TreeArc::cast(self.syntax.to_owned()) } |
2910 | } | 2911 | } |
2911 | 2912 | ||
2912 | 2913 | ||
2913 | impl PosFieldList { | 2914 | impl PosFieldDefList { |
2914 | pub fn fields(&self) -> impl Iterator<Item = &PosField> { | 2915 | pub fn fields(&self) -> impl Iterator<Item = &PosFieldDef> { |
2915 | super::children(self) | 2916 | super::children(self) |
2916 | } | 2917 | } |
2917 | } | 2918 | } |