-
Notifications
You must be signed in to change notification settings - Fork 876
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
Extra brace is inserted after #[cfg(...)]
on a block
#4475
Comments
Thank you for the report, though closing as a duplicate of #4467 and #4452 (comment). Will be addressed in the next rustc-ap bump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When formatting a single-line block expression with a
#[cfg(...)]
attribute before it, an extra open brace is produced.To Reproduce
main.rs
:Run
rustfmt main.rs
main.rs
now contains:Expected behavior
The braces are put onto different lines correctly
Meta
rustfmt version:
rustfmt 1.4.22-nightly (97d03010 2020-10-04)
From where did you install rustfmt?: I think cargo
How do you run rustfmt:
I tried with both
cargo fmt
andrustfmt
. Both do the sameThe text was updated successfully, but these errors were encountered: