Closed
Description
Describe the bug
cargo fmt
fails with:
error[internal]: left behind trailing whitespace
--> /tmp/cargo-fmt-fail/src/lib.rs:1:1:16
|
1 | const A: usize =
| ^
|
warning: rustfmt has failed to format. See previous 1 errors.
To Reproduce
Copy and paste this into a new source file (note the trailing whitespace in first line):
const A: usize =
// Some constant
2;
Expected behavior
Meta
- rustfmt version: rustfmt 1.4.18-stable (8157a3f 2020-07-15)
- From where did you install rustfmt?: rustup
- How do you run rustfmt:
cargo fmt
,rustfmt