We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9dbe33d commit 728e117Copy full SHA for 728e117
compiler/rustc_parse/src/parser/expr.rs
@@ -3182,6 +3182,17 @@ impl<'a> Parser<'a> {
3182
})?;
3183
3184
let require_comma = match expr.kind {
3185
+ // Special case: braced macro calls require comma in a match
3186
+ // arm, even though they do not require semicolon in a
3187
+ // statement.
3188
+ //
3189
+ // m! {} // okay without semicolon
3190
3191
+ // match ... {
3192
+ // _ => m! {}, // requires comma
3193
+ // _ => ...
3194
+ // }
3195
3196
ExprKind::MacCall(_) => true,
3197
_ => classify::expr_requires_semi_to_be_stmt(&expr),
3198
} && this.token != token::CloseDelim(Delimiter::Brace);
0 commit comments