Open
Description
Using rustfmt 1.6.0-stable (2023-12-04 a28077b), the following formatting is produced:
struct Foo {
#[cfg(all())]
something_long_enough_to_wrap_foo: i32,
#[cfg(all())]
something_long_enough_to_wrap_bar: i32,
}
fn example() {
let Foo {
#[cfg(all())]
something_long_enough_to_wrap_foo,
#[cfg(all())]
something_long_enough_to_wrap_bar: bar_var,
} = Foo {
#[cfg(all())]
something_long_enough_to_wrap_foo: 111,
#[cfg(all())]
something_long_enough_to_wrap_bar: 222,
};
}
Note that in the Foo
pattern, the line something_long_enough_to_wrap_bar: bar_var
is indented one more level, but in all other cases, there is no additional indentation level. This seems unusual and inconsistent, and so I suggest that it be changed to be consistent in the next "style edition".