Formatting use
statements sometimes leaves behind spaces and newlines
#6277
Labels
a-imports
`use` syntax
bug
Panic, non-idempotency, invalid code, etc.
e-trailing whitespace
error[internal]: left behind trailing whitespace
poor-formatting
Formatting the following code with
cargo fmt
leaves behind a space and curly braces.Before:
(there are 4 spaces on the seemingly empty line)
After:
Expected:
Here a newline is left behind and rustfmt reports an internal error.
Before:
(there are again 4 spaces on the seemingly empty line)
After:
(there are again 4 spaces on the seemingly empty line, rustfmt didn't touch them)
Expected:
Command output:
The text was updated successfully, but these errors were encountered: