Skip to content

Commit a1dc28f

Browse files
committed
Resolve TODO about curly-braced constructions in expression statement
1 parent 1677f35 commit a1dc28f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2076,9 +2076,11 @@ impl Abi {}
20762076
/// ❰ (); ❱
20772077
/// ❰ {}; ❱
20782078
///
2079-
/// // constructions with trailing curly brace can omit the semicolon // TODO: clarify
2079+
/// // constructions with trailing curly brace can omit the semicolon
2080+
/// // but only when there are satements immediately after them (this is important!)
20802081
/// ❰ if bool_cond { } ❱
20812082
/// ❰ loop {} ❱
2083+
/// ❰ somestatment; ❱
20822084
/// ```
20832085
///
20842086
/// [Reference](https://doc.rust-lang.org/reference/statements.html)

xtask/src/ast_src.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1722,9 +1722,11 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
17221722
/// ❰ (); ❱
17231723
/// ❰ {}; ❱
17241724
///
1725-
/// // constructions with trailing curly brace can omit the semicolon // TODO: clarify
1725+
/// // constructions with trailing curly brace can omit the semicolon
1726+
/// // but only when there are satements immediately after them (this is important!)
17261727
/// ❰ if bool_cond { } ❱
17271728
/// ❰ loop {} ❱
1729+
/// ❰ somestatment; ❱
17281730
/// ```
17291731
///
17301732
/// [Reference](https://doc.rust-lang.org/reference/statements.html)

0 commit comments

Comments
 (0)