Open
Description
For a struct-like macro:
macro_rules! foo {
(
foo: $foo:literal,
bar: $bar:literal,
baz: $baz:literal,
qux: $qux:literal,
quux: $quux:literal,
corge: $corge:literal,
) => {};
}
Formatting with format_macro_matchers = true
produces weird results:
macro_rules! foo {
(
foo:
$foo:literal,bar:
$bar:literal,baz:
$baz:literal,qux:
$qux:literal,quux:
$quux:literal,corge:
$corge:literal,
) => {};
}
It seems like it always removes whitespace after a comma rather than using it as a possible break location. Single-line macros have similarly weird results:
macro_rules! foo {
(foo: $foo:ident,bar: $bar:ident,baz: $baz:ident,qux: $qux:ident,) => {};
}
rustfmt 1.7.0-nightly (f704f3b9 2023-12-19)