Bug: trailing_comma + struct_field_align_threshold -> removing a struct's commas #4099
Labels
bug
Panic, non-idempotency, invalid code, etc.
only-with-option
requires a non-default option value to reproduce
rustfmt 1.4.12-nightly (9f53665f 2020-02-10)
rustc 1.44.0-nightly (f509b26a7 2020-03-18)
Minimal repro
.rustfmt.toml
:src/main.rs
with astruct
like it:cargo fmt
The actual result of
src/main.rs
:Note: The commas are removed. Unfortunately, this result could not be compiled then I think it is high priority bug maybe.
The Expected result of
src/main.rs
:Note: I tried some different versions of the minimal repro code. So, I found two variations that could be format expectedly.
Note: These variant patterns be retained these commas
cargo fmt
once. However, once againcargo fmt
, then these are removed.The text was updated successfully, but these errors were encountered: