rustfmt icon indicating copy to clipboard operation
rustfmt copied to clipboard

rustfmt doesn't format macro with repetition

Open tkkcc opened this issue 2 years ago • 1 comments

rustfmt 1.5.1-nightly (9243168 2022-08-31)

rustfmt.toml:

format_macro_matchers = true
format_macro_bodies = true
format_strings = false

code won't format

macro_rules! test {
    ($( $v:expr ),*) => {
        $(      $v),*
    };
}

tkkcc avatar Sep 06 '22 08:09 tkkcc

I believe that's intentional. See #2410 and the linked issues, but long story short rustfmt doesn't support formatting repetitions at the moment.

ytmimi avatar Sep 06 '22 14:09 ytmimi