aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast/generated/nodes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/ast/generated/nodes.rs')
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index fbf3b457a..01e8111b0 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -75,7 +75,7 @@ impl ExternCrateItem {
75 pub fn crate_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![crate]) } 75 pub fn crate_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![crate]) }
76 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } 76 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
77 pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) } 77 pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) }
78 pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) } 78 pub fn rename(&self) -> Option<Rename> { support::child(&self.syntax) }
79 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } 79 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
80} 80}
81#[derive(Debug, Clone, PartialEq, Eq, Hash)] 81#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1178,7 +1178,7 @@ impl UseTree {
1178 pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) } 1178 pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
1179 pub fn star_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![*]) } 1179 pub fn star_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![*]) }
1180 pub fn use_tree_list(&self) -> Option<UseTreeList> { support::child(&self.syntax) } 1180 pub fn use_tree_list(&self) -> Option<UseTreeList> { support::child(&self.syntax) }
1181 pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) } 1181 pub fn rename(&self) -> Option<Rename> { support::child(&self.syntax) }
1182} 1182}
1183#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1183#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1184pub struct UseTreeList { 1184pub struct UseTreeList {
@@ -1190,11 +1190,11 @@ impl UseTreeList {
1190 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } 1190 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1191} 1191}
1192#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1192#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1193pub struct Alias { 1193pub struct Rename {
1194 pub(crate) syntax: SyntaxNode, 1194 pub(crate) syntax: SyntaxNode,
1195} 1195}
1196impl ast::NameOwner for Alias {} 1196impl ast::NameOwner for Rename {}
1197impl Alias { 1197impl Rename {
1198 pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) } 1198 pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) }
1199} 1199}
1200#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1200#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -2683,8 +2683,8 @@ impl AstNode for UseTreeList {
2683 } 2683 }
2684 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2684 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2685} 2685}
2686impl AstNode for Alias { 2686impl AstNode for Rename {
2687 fn can_cast(kind: SyntaxKind) -> bool { kind == ALIAS } 2687 fn can_cast(kind: SyntaxKind) -> bool { kind == RENAME }
2688 fn cast(syntax: SyntaxNode) -> Option<Self> { 2688 fn cast(syntax: SyntaxNode) -> Option<Self> {
2689 if Self::can_cast(syntax.kind()) { 2689 if Self::can_cast(syntax.kind()) {
2690 Some(Self { syntax }) 2690 Some(Self { syntax })
@@ -4040,7 +4040,7 @@ impl std::fmt::Display for UseTreeList {
4040 std::fmt::Display::fmt(self.syntax(), f) 4040 std::fmt::Display::fmt(self.syntax(), f)
4041 } 4041 }
4042} 4042}
4043impl std::fmt::Display for Alias { 4043impl std::fmt::Display for Rename {
4044 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 4044 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4045 std::fmt::Display::fmt(self.syntax(), f) 4045 std::fmt::Display::fmt(self.syntax(), f)
4046 } 4046 }