Open antifuchs opened 1 month ago
@antifuchs thanks for the report. What version of rustfmt are you using? Also, are all of these configs relevant to reproduce the error? Can you make the reproducible test case smaller?
This happens on both rustfmt 1.7.1-stable (eeb90cda 2024-09-04)
and rustfmt 1.8.0-nightly (9ff5fc4ffb 2024-10-03)
.
I've reduced the config file that triggers that issue to the following:
use_small_heuristics = "Off"
Only Off
triggers this, both Default
and Max
values result in correctly-written config. I'll adjust the issue title.
I'm attempting to detect whether a project has unstable rustfmt features configured, and was hoping to use rustfmt to detect that. However, with a config file like:
running the following only prints an error:
I would expect that config file to re-serialize correctly, as the formatter does do the work according to the config.