aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs32
-rw-r--r--xtask/src/ast_src.rs15
2 files changed, 0 insertions, 47 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)
diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs
index 47a5d1d91..ab50eee36 100644
--- a/xtask/src/ast_src.rs
+++ b/xtask/src/ast_src.rs
@@ -2010,21 +2010,6 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
2010 /// [Reference](https://doc.rust-lang.org/reference/macros.html) 2010 /// [Reference](https://doc.rust-lang.org/reference/macros.html)
2011 struct MacroItems: ModuleItemOwner { } 2011 struct MacroItems: ModuleItemOwner { }
2012 2012
2013 // TODO: Idk what I am writing here, please don't believe these words.
2014 // TODO: clarify @matklad @edwin0cheng
2015 /// Macro statements is a node that holds an statements created by expanding a macro.
2016 ///
2017 /// ```
2018 /// foo!(); // expands into some statements -v
2019 /// // ❰ foo_crate::bar(); ❱
2020 /// ```
2021 ///
2022 /// [Reference](https://doc.rust-lang.org/reference/macros.html)
2023 struct MacroStmts {
2024 statements: [Stmt],
2025 Expr,
2026 }
2027
2028 /// List of items in an extern block. 2013 /// List of items in an extern block.
2029 /// 2014 ///
2030 /// ``` 2015 /// ```