Open boozook opened 4 weeks ago
Valid code example (just from some crate documentation):
use binrw::{ binrw, // #[binrw] attribute BinRead, // trait for reading BinWrite, // trait for writing };
My rustfmt.toml:
rustfmt.toml
imports_indent = "Visual"
Version of rustfmt: rustfmt 1.8.0-nightly (4392847410 2024-10-21)
rustfmt
rustfmt 1.8.0-nightly (4392847410 2024-10-21)
Expected result of formatting example code above: (something like this, not sure)
use binrw::{binrw, // #[binrw] attribute BinRead, // trait for reading BinWrite, // trait for writing };
Actual result that breaks the code - closing curly-brace placed to the last comment:
use binrw::{binrw, // #[binrw] attribute BinRead, // trait for reading BinWrite // trait for writing};
Thanks for the report. Confirming I can reproduce this with rustfmt 1.8.0-nightly (96cc01b197 2024-10-23)
Valid code example (just from some crate documentation):
My
rustfmt.toml
:Version of
rustfmt
:rustfmt 1.8.0-nightly (4392847410 2024-10-21)
Expected result of formatting example code above: (something like this, not sure)
Actual result that breaks the code - closing curly-brace placed to the last comment: