Skip to content

rustfmt doesn't format macro with repetition #5534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tkkcc opened this issue Sep 6, 2022 · 1 comment
Open

rustfmt doesn't format macro with repetition #5534

tkkcc opened this issue Sep 6, 2022 · 1 comment

Comments

@tkkcc
Copy link

tkkcc commented Sep 6, 2022

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),*
    };
}
@ytmimi
Copy link
Contributor

ytmimi commented Sep 6, 2022

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 ytmimi changed the title repetition macro break whole macro format rustfmt doesn't format macro with repetition Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants