Formatting error ('left behind trailing whitespace') on if statement with comment between &&
and expression
#6342
Labels
&&
and expression
#6342
Reproducer:
(This is a minimal example of the format error made from real code, this is why there is a nonsensical
None == Some(...)
comparison,&& true
and atodo!()
)Trying to use
rustfmt
(throughcargo fmt
) on this results in an error and the code being partially formatted.cargo fmt --check
result:I don't know if the long field name has anything to do with this, but the comment certainly does, as removing it will make it format correctly.
Removing the trailing space manually will make
rustfmt
not format but still return with exit code 0.The text was updated successfully, but these errors were encountered: