Formatting empty where
clause with trailing_comma = "Never"
leaves trailing whitespace, causing an error.
#5012
Labels
bug
Panic, non-idempotency, invalid code, etc.
only-with-option
requires a non-default option value to reproduce
Formatting the following code with
trailing_comma = "Never"
will leave trailing whitespace:Without
trailing_comma = "Never"
, the line is formatted like this:The trailing whitespace causes
rustfmt has failed to format
, resulting in the whole file not being formatted.A workaround is to leave a comment at the end of the line like this:
The text was updated successfully, but these errors were encountered: