-
Notifications
You must be signed in to change notification settings - Fork 888
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
Indentation in macros is handled oddly #4611
Comments
Could you check to see if you have hard tabs in your original source (or more likely a mix of tabs/spaces) that are being converted to all spaces? rustfmt doesn't really format macro calls (outside a few cases with calls using parens instead of braces), so tabs --> spaces seems like the most likely cause |
Where was this completed @delbonis ? How can I use it? Formatting still doesn't work for the select macro. |
@alvatar I have the same issue, do you have any workaround? |
rustfmt does not apply formatting rules to args when the call sites use brace delims, and the output should generally match the input. This particular issue was not about rustfmt applying formatting rules to the contents of the There's no point in asking for macro-specific formatting here (you can subscribe/follow along at #8 for those discussions), and if you're seeing the exact behavior described in the original description of this issue while 100% confident you don't have the referenced tabs vs. spaces cause, then please open a new issue with a minimal, complete repro |
Input
This is basically what
company-mode
gives us. I edited it slightly from the actual code but preserved the indentation.Output
Expected output
Something that resembles the input.
Meta
rustfmt 1.4.30-nightly (acd9486 2020-12-20)
The text was updated successfully, but these errors were encountered: