Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/expressions/block-expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ BlockExpression ->
Statements?
`}`

BlockExpressionNoInnerAttributes ->
Copy link
Copy Markdown
Member Author

@fmease fmease May 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming inspired by TypeNoBounds.

View changes since the review

`{`
Statements?
`}`

Statements ->
Statement+
| Statement+ ExpressionWithoutBlock
Expand Down
4 changes: 2 additions & 2 deletions src/expressions/if-expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ r[expr.if]
r[expr.if.syntax]
```grammar,expressions
IfExpression ->
`if` Conditions BlockExpression
(`else` ( BlockExpression | IfExpression ) )?
`if` Conditions BlockExpressionNoInnerAttributes
(`else` ( BlockExpressionNoInnerAttributes | IfExpression ) )?

Conditions ->
Expression _except [StructExpression]_
Expand Down
2 changes: 1 addition & 1 deletion src/macros-by-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ In the matcher, `$` _name_ `:` _fragment-specifier_ matches a Rust syntax fragme
r[macro.decl.meta.specifier]
Valid fragment specifiers are:

* `block`: a [BlockExpression]
* `block`: a [BlockExpressionNoInnerAttributes]
* `expr`: an [Expression]
* `expr_2021`: an [Expression] except [UnderscoreExpression] and [ConstBlockExpression] (see [macro.decl.meta.edition2024])
* `ident`: an [IDENTIFIER_OR_KEYWORD] except `_`, [RAW_IDENTIFIER], or [`$crate`]
Expand Down
3 changes: 2 additions & 1 deletion src/statements.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ LetStatement ->
OuterAttribute* `let` PatternNoTopAlt ( `:` Type )?
(
`=` Expression
| `=` Expression _except [LazyBooleanExpression] or end with a `}`_ `else` BlockExpression
| `=` Expression _except [LazyBooleanExpression] or end with a `}`_
`else` BlockExpressionNoInnerAttributes
)? `;`
```

Expand Down
Loading