Skip to content

Commit 33f2409

Browse files
committed
Carify on a semicolon in macro call
1 parent a1dc28f commit 33f2409

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

crates/ra_syntax/src/ast/generated/nodes.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,12 @@ impl NameRef {}
18301830
/// }
18311831
/// ❱
18321832
///
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+
/// }
18341839
/// ```
18351840
///
18361841
/// [Reference](https://doc.rust-lang.org/reference/macros.html)

xtask/src/ast_src.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,12 +1554,17 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
15541554
/// }
15551555
/// ❱
15561556
///
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+
/// }
15581563
/// ```
15591564
///
15601565
/// [Reference](https://doc.rust-lang.org/reference/macros.html)
15611566
struct MacroCall: NameOwner, AttrsOwner, DocCommentsOwner {
1562-
Path, T![!], TokenTree, T![;] // TODO: what is the meaning of the semicolon here?
1567+
Path, T![!], TokenTree, T![;]
15631568
}
15641569

15651570
/// Attribute.

0 commit comments

Comments
 (0)