rust/tests/target/issue_4791.rs
cassaundra ee130515e3 Fix missing struct field separators under certain conditions
When struct_field_align_threshold is non-zero and trailing_comma is set to
"Never," struct field separators are omitted between field groups. This issue is
resolved by forcing separators between groups.

Fixes #4791.

A test is included with a minimal reproducible example.
2022-03-06 11:23:50 -06:00

15 lines
177 B
Rust

// rustfmt-struct_field_align_threshold: 30
// rustfmt-trailing_comma: Never
struct Foo {
group_a: u8,
group_b: u8
}
struct Bar {
group_a: u8,
group_b: u8
}