From 7a49165f5d5c8186edd04f874eae8a98e39d3df6 Mon Sep 17 00:00:00 2001 From: veetaha Date: Sun, 10 May 2020 19:11:22 +0300 Subject: Remove MacroStmts as per edwin0cheng --- crates/ra_syntax/src/ast/generated/nodes.rs | 32 ----------------------------- 1 file changed, 32 deletions(-) (limited to 'crates/ra_syntax') diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 4bcdbd495..7de20bff7 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs @@ -2469,22 +2469,6 @@ pub struct MacroItems { } impl ast::ModuleItemOwner for MacroItems {} impl MacroItems {} -/// Macro statements is a node that holds an statements created by expanding a macro. -/// -/// ``` -/// foo!(); // expands into some statements -v -/// // ❰ foo_crate::bar(); ❱ -/// ``` -/// -/// [Reference](https://doc.rust-lang.org/reference/macros.html) -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct MacroStmts { - pub(crate) syntax: SyntaxNode, -} -impl MacroStmts { - pub fn statements(&self) -> AstChildren { support::children(&self.syntax) } - pub fn expr(&self) -> Option { support::child(&self.syntax) } -} /// List of items in an extern block. /// /// ``` @@ -4041,17 +4025,6 @@ impl AstNode for MacroItems { } fn syntax(&self) -> &SyntaxNode { &self.syntax } } -impl AstNode for MacroStmts { - fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_STMTS } - fn cast(syntax: SyntaxNode) -> Option { - if Self::can_cast(syntax.kind()) { - Some(Self { syntax }) - } else { - None - } - } - fn syntax(&self) -> &SyntaxNode { &self.syntax } -} impl AstNode for ExternItemList { fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_ITEM_LIST } fn cast(syntax: SyntaxNode) -> Option { @@ -5484,11 +5457,6 @@ impl std::fmt::Display for MacroItems { std::fmt::Display::fmt(self.syntax(), f) } } -impl std::fmt::Display for MacroStmts { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - std::fmt::Display::fmt(self.syntax(), f) - } -} impl std::fmt::Display for ExternItemList { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { std::fmt::Display::fmt(self.syntax(), f) -- cgit v1.2.3