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 18bc0bb commit a6e3f13Copy full SHA for a6e3f13
compiler/rustc_parse/src/parser/expr.rs
@@ -3035,6 +3035,17 @@ impl<'a> Parser<'a> {
3035
})?;
3036
3037
let require_comma = match expr.kind {
3038
+ // Special case: braced macro calls require comma in a match
3039
+ // arm, even though they do not require semicolon in a
3040
+ // statement.
3041
+ //
3042
+ // m! {} // okay without semicolon
3043
3044
+ // match ... {
3045
+ // _ => m! {}, // requires comma
3046
+ // _ => ...
3047
+ // }
3048
3049
ExprKind::MacCall(_) => true,
3050
_ => classify::expr_requires_semi_to_be_stmt(&expr),
3051
} && this.token != token::CloseDelim(Delimiter::Brace);
0 commit comments