aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorveetaha <[email protected]>2020-05-10 17:11:22 +0100
committerveetaha <[email protected]>2020-05-10 17:11:22 +0100
commit7a49165f5d5c8186edd04f874eae8a98e39d3df6 (patch)
tree9e01929e1ef5014c14cf76eca8b41508659fe4d9 /crates
parent258a3461b428efa0b8cc8fcd40c7844a8ce22406 (diff)
Remove MacroStmts as per edwin0cheng
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs32
1 files changed, 0 insertions, 32 deletions
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 {
2469} 2469}
2470impl ast::ModuleItemOwner for MacroItems {} 2470impl ast::ModuleItemOwner for MacroItems {}
2471impl MacroItems {} 2471impl MacroItems {}
2472/// Macro statements is a node that holds an statements created by expanding a macro.
2473///
2474/// ```
2475/// foo!(); // expands into some statements -v
2476/// // ❰ foo_crate::bar(); ❱
2477/// ```
2478///
2479/// [Reference](https://doc.rust-lang.org/reference/macros.html)
2480#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2481pub struct MacroStmts {
2482 pub(crate) syntax: SyntaxNode,
2483}
2484impl MacroStmts {
2485 pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) }
2486 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2487}
2488/// List of items in an extern block. 2472/// List of items in an extern block.
2489/// 2473///
2490/// ``` 2474/// ```
@@ -4041,17 +4025,6 @@ impl AstNode for MacroItems {
4041 } 4025 }
4042 fn syntax(&self) -> &SyntaxNode { &self.syntax } 4026 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4043} 4027}
4044impl AstNode for MacroStmts {
4045 fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_STMTS }
4046 fn cast(syntax: SyntaxNode) -> Option<Self> {
4047 if Self::can_cast(syntax.kind()) {
4048 Some(Self { syntax })
4049 } else {
4050 None
4051 }
4052 }
4053 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4054}
4055impl AstNode for ExternItemList { 4028impl AstNode for ExternItemList {
4056 fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_ITEM_LIST } 4029 fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_ITEM_LIST }
4057 fn cast(syntax: SyntaxNode) -> Option<Self> { 4030 fn cast(syntax: SyntaxNode) -> Option<Self> {
@@ -5484,11 +5457,6 @@ impl std::fmt::Display for MacroItems {
5484 std::fmt::Display::fmt(self.syntax(), f) 5457 std::fmt::Display::fmt(self.syntax(), f)
5485 } 5458 }
5486} 5459}
5487impl std::fmt::Display for MacroStmts {
5488 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5489 std::fmt::Display::fmt(self.syntax(), f)
5490 }
5491}
5492impl std::fmt::Display for ExternItemList { 5460impl std::fmt::Display for ExternItemList {
5493 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 5461 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5494 std::fmt::Display::fmt(self.syntax(), f) 5462 std::fmt::Display::fmt(self.syntax(), f)