Open grahamc opened 1 year ago
On rustfmt 1.6.0, I get surprising indentation when destructuring a struct where some fields are cfg-specific.
struct Demo { field_name_foo: (), field_name_bar: (), #[cfg(feature = "diagnostics")] field_name_baz: (), field_name_tux: (), } fn main() { let Demo { field_name_foo, #[cfg(feature = "diagnostics")] field_name_baz: _, field_name_bar, field_name_tux, } = Demo { field_name_foo: (), field_name_bar: (), #[cfg(feature = "diagnostics")] field_name_baz: (), field_name_tux: (), }; }
Thanks for reaching out. I also tested this with rustfmt 1.5.3-nightly (f4b80cac 2023-06-30) and reproduced the issue.
rustfmt 1.5.3-nightly (f4b80cac 2023-06-30)
On rustfmt 1.6.0, I get surprising indentation when destructuring a struct where some fields are cfg-specific.