You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't insert semicolons inside of a macro_rules! arm body
Currently, rustfmt inserts semicolons for certain trailing expressions
(`return`, `continue`, and `break`). However, this should not be done in
the body of a `macro_rules!` arm, since the macro might be used in
expression position (where a trailing semicolon will be invalid).
Currently, this rewriting has no effect due to rust-lang/rust#33953
If this issue is fixed, then this rewriting will prevent some macros
from being used in expression position.
This commit prevents rustfmt from inserting semicolons for trailing
expressions in `macro_rules!` arms. The user is free to either include
or omit the semicolon - rustfmt will not modify either case.
0 commit comments