From 33f240960d15a24036fa72c5410ea296f3ce5b78 Mon Sep 17 00:00:00 2001 From: veetaha Date: Sun, 10 May 2020 21:57:49 +0300 Subject: Carify on a semicolon in macro call --- crates/ra_syntax/src/ast/generated/nodes.rs | 7 ++++++- xtask/src/ast_src.rs | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 9254e4fd4..be49d73ac 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs @@ -1830,7 +1830,12 @@ impl NameRef {} /// } /// ❱ /// -/// ❰ foo!() ❱ +/// // semicolon is a part of `MacroCall` when it is used in item positions +/// ❰ foo!(); ❱ +/// +/// fn main() { +/// ❰ foo!() ❱; // macro call expression position doesn't include the semi +/// } /// ``` /// /// [Reference](https://doc.rust-lang.org/reference/macros.html) diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs index a1dc2ce46..d002745ed 100644 --- a/xtask/src/ast_src.rs +++ b/xtask/src/ast_src.rs @@ -1554,12 +1554,17 @@ pub(crate) const AST_SRC: AstSrc = AstSrc { /// } /// ❱ /// - /// ❰ foo!() ❱ + /// // semicolon is a part of `MacroCall` when it is used in item positions + /// ❰ foo!(); ❱ + /// + /// fn main() { + /// ❰ foo!() ❱; // macro call expression position doesn't include the semi + /// } /// ``` /// /// [Reference](https://doc.rust-lang.org/reference/macros.html) struct MacroCall: NameOwner, AttrsOwner, DocCommentsOwner { - Path, T![!], TokenTree, T![;] // TODO: what is the meaning of the semicolon here? + Path, T![!], TokenTree, T![;] } /// Attribute. -- cgit v1.2.3