aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs24
-rw-r--r--xtask/src/codegen/rust.ungram3
2 files changed, 0 insertions, 27 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index c25fa7d5f..6ce9c4adc 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -1246,14 +1246,6 @@ impl TuplePat {
1246 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } 1246 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1247} 1247}
1248#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1248#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1249pub struct MacroDef {
1250 pub(crate) syntax: SyntaxNode,
1251}
1252impl ast::NameOwner for MacroDef {}
1253impl MacroDef {
1254 pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
1255}
1256#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1257pub struct MacroItems { 1249pub struct MacroItems {
1258 pub(crate) syntax: SyntaxNode, 1250 pub(crate) syntax: SyntaxNode,
1259} 1251}
@@ -2735,17 +2727,6 @@ impl AstNode for TuplePat {
2735 } 2727 }
2736 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2728 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2737} 2729}
2738impl AstNode for MacroDef {
2739 fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_DEF }
2740 fn cast(syntax: SyntaxNode) -> Option<Self> {
2741 if Self::can_cast(syntax.kind()) {
2742 Some(Self { syntax })
2743 } else {
2744 None
2745 }
2746 }
2747 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2748}
2749impl AstNode for MacroItems { 2730impl AstNode for MacroItems {
2750 fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_ITEMS } 2731 fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_ITEMS }
2751 fn cast(syntax: SyntaxNode) -> Option<Self> { 2732 fn cast(syntax: SyntaxNode) -> Option<Self> {
@@ -4081,11 +4062,6 @@ impl std::fmt::Display for TuplePat {
4081 std::fmt::Display::fmt(self.syntax(), f) 4062 std::fmt::Display::fmt(self.syntax(), f)
4082 } 4063 }
4083} 4064}
4084impl std::fmt::Display for MacroDef {
4085 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4086 std::fmt::Display::fmt(self.syntax(), f)
4087 }
4088}
4089impl std::fmt::Display for MacroItems { 4065impl std::fmt::Display for MacroItems {
4090 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 4066 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4091 std::fmt::Display::fmt(self.syntax(), f) 4067 std::fmt::Display::fmt(self.syntax(), f)
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram
index 1d8bed0b4..2e3b45011 100644
--- a/xtask/src/codegen/rust.ungram
+++ b/xtask/src/codegen/rust.ungram
@@ -539,9 +539,6 @@ NameRef =
539MacroCall = 539MacroCall =
540 Attr* Path '!' Name? TokenTree ';'? 540 Attr* Path '!' Name? TokenTree ';'?
541 541
542MacroDef =
543 Name TokenTree
544
545TokenTree = 542TokenTree =
546 '(' ')' | '{' '}' | '[' ']' 543 '(' ')' | '{' '}' | '[' ']'
547 544