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 e678f3d commit 8304a36Copy full SHA for 8304a36
compiler/rustc_parse/src/parser/expr.rs
@@ -3160,6 +3160,17 @@ impl<'a> Parser<'a> {
3160
})?;
3161
3162
let require_comma = match expr.kind {
3163
+ // Special case: braced macro calls require comma in a match
3164
+ // arm, even though they do not require semicolon in a
3165
+ // statement.
3166
+ //
3167
+ // m! {} // okay without semicolon
3168
3169
+ // match ... {
3170
+ // _ => m! {}, // requires comma
3171
+ // _ => ...
3172
+ // }
3173
3174
ExprKind::MacCall(_) => true,
3175
_ => classify::expr_requires_semi_to_be_stmt(&expr),
3176
} && this.token != token::CloseDelim(Delimiter::Brace);
0 commit comments