diff options
author | veetaha <[email protected]> | 2020-05-10 19:57:49 +0100 |
---|---|---|
committer | veetaha <[email protected]> | 2020-05-10 19:57:49 +0100 |
commit | 33f240960d15a24036fa72c5410ea296f3ce5b78 (patch) | |
tree | 3454b7b15d316a62463ff0dca19cad78b7d20f8f | |
parent | a1dc28f236af8d76d2125b3d5a27c0139b682c64 (diff) |
Carify on a semicolon in macro call
-rw-r--r-- | crates/ra_syntax/src/ast/generated/nodes.rs | 7 | ||||
-rw-r--r-- | 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 {} | |||
1830 | /// } | 1830 | /// } |
1831 | /// ❱ | 1831 | /// ❱ |
1832 | /// | 1832 | /// |
1833 | /// ❰ foo!() ❱ | 1833 | /// // semicolon is a part of `MacroCall` when it is used in item positions |
1834 | /// ❰ foo!(); ❱ | ||
1835 | /// | ||
1836 | /// fn main() { | ||
1837 | /// ❰ foo!() ❱; // macro call expression position doesn't include the semi | ||
1838 | /// } | ||
1834 | /// ``` | 1839 | /// ``` |
1835 | /// | 1840 | /// |
1836 | /// [Reference](https://doc.rust-lang.org/reference/macros.html) | 1841 | /// [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 { | |||
1554 | /// } | 1554 | /// } |
1555 | /// ❱ | 1555 | /// ❱ |
1556 | /// | 1556 | /// |
1557 | /// ❰ foo!() ❱ | 1557 | /// // semicolon is a part of `MacroCall` when it is used in item positions |
1558 | /// ❰ foo!(); ❱ | ||
1559 | /// | ||
1560 | /// fn main() { | ||
1561 | /// ❰ foo!() ❱; // macro call expression position doesn't include the semi | ||
1562 | /// } | ||
1558 | /// ``` | 1563 | /// ``` |
1559 | /// | 1564 | /// |
1560 | /// [Reference](https://doc.rust-lang.org/reference/macros.html) | 1565 | /// [Reference](https://doc.rust-lang.org/reference/macros.html) |
1561 | struct MacroCall: NameOwner, AttrsOwner, DocCommentsOwner { | 1566 | struct MacroCall: NameOwner, AttrsOwner, DocCommentsOwner { |
1562 | Path, T![!], TokenTree, T![;] // TODO: what is the meaning of the semicolon here? | 1567 | Path, T![!], TokenTree, T![;] |
1563 | } | 1568 | } |
1564 | 1569 | ||
1565 | /// Attribute. | 1570 | /// Attribute. |