From 23172a116c3cc4ca9a692dfdd05051d1a4aee2b2 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 26 Jan 2019 00:24:12 +0300 Subject: rename POS_FIELD -> POS_FIELD_DEF to match NAMED_FIELD_DEF --- crates/ra_syntax/src/ast/generated.rs | 42 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'crates/ra_syntax/src/ast/generated.rs') diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index e936c2a6d..3ace6533c 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs @@ -2851,68 +2851,68 @@ impl PointerType { } } -// PosField +// PosFieldDef #[derive(Debug, PartialEq, Eq, Hash)] #[repr(transparent)] -pub struct PosField { +pub struct PosFieldDef { pub(crate) syntax: SyntaxNode, } -unsafe impl TransparentNewType for PosField { +unsafe impl TransparentNewType for PosFieldDef { type Repr = rowan::SyntaxNode; } -impl AstNode for PosField { +impl AstNode for PosFieldDef { fn cast(syntax: &SyntaxNode) -> Option<&Self> { match syntax.kind() { - POS_FIELD => Some(PosField::from_repr(syntax.into_repr())), + POS_FIELD_DEF => Some(PosFieldDef::from_repr(syntax.into_repr())), _ => None, } } fn syntax(&self) -> &SyntaxNode { &self.syntax } } -impl ToOwned for PosField { - type Owned = TreeArc; - fn to_owned(&self) -> TreeArc { TreeArc::cast(self.syntax.to_owned()) } +impl ToOwned for PosFieldDef { + type Owned = TreeArc; + fn to_owned(&self) -> TreeArc { TreeArc::cast(self.syntax.to_owned()) } } -impl ast::VisibilityOwner for PosField {} -impl ast::AttrsOwner for PosField {} -impl PosField { +impl ast::VisibilityOwner for PosFieldDef {} +impl ast::AttrsOwner for PosFieldDef {} +impl PosFieldDef { pub fn type_ref(&self) -> Option<&TypeRef> { super::child_opt(self) } } -// PosFieldList +// PosFieldDefList #[derive(Debug, PartialEq, Eq, Hash)] #[repr(transparent)] -pub struct PosFieldList { +pub struct PosFieldDefList { pub(crate) syntax: SyntaxNode, } -unsafe impl TransparentNewType for PosFieldList { +unsafe impl TransparentNewType for PosFieldDefList { type Repr = rowan::SyntaxNode; } -impl AstNode for PosFieldList { +impl AstNode for PosFieldDefList { fn cast(syntax: &SyntaxNode) -> Option<&Self> { match syntax.kind() { - POS_FIELD_LIST => Some(PosFieldList::from_repr(syntax.into_repr())), + POS_FIELD_DEF_LIST => Some(PosFieldDefList::from_repr(syntax.into_repr())), _ => None, } } fn syntax(&self) -> &SyntaxNode { &self.syntax } } -impl ToOwned for PosFieldList { - type Owned = TreeArc; - fn to_owned(&self) -> TreeArc { TreeArc::cast(self.syntax.to_owned()) } +impl ToOwned for PosFieldDefList { + type Owned = TreeArc; + fn to_owned(&self) -> TreeArc { TreeArc::cast(self.syntax.to_owned()) } } -impl PosFieldList { - pub fn fields(&self) -> impl Iterator { +impl PosFieldDefList { + pub fn fields(&self) -> impl Iterator { super::children(self) } } -- cgit v1.2.3