rustfmt: rustfmt fails with errors "left behind trailing whitespace"

I have rustfmt-preview installed on the nightly toolchain (rustc 1.30.0-nightly (3edb355b7 2018-08-03)) using rustup.

Running cargo +nightly fmt on the crate: https://github.com/frankmcsherry/differential-dataflow results in numerous “left behind trailing whitespace” errors. Some sample errors:

internal error: left behind trailing whitespace
  --> [..]/differential-dataflow/src/algorithms/prefix_sum.rs:70
   |
70 |         .iterate(|ranges| 
   |                          ^
warning: rustfmt may have failed to format. See previous 1 errors.

  --> [..]/differential-dataflow/examples/seb.rs:37
   |
37 |       let cooccurrences = 
   |                          ^
  --> [..]/differential-dataflow/examples/seb.rs:44
   |
44 |       let row_sums = 
   |                     ^

  --> [..]/differential-dataflow/examples/dataflow.rs:35
   |
35 |             let (tweet_input, tweets) = scope.new_collection(); 
   |                                                                ^

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 10
  • Comments: 25 (13 by maintainers)

Commits related to this issue

Most upvoted comments

I am still getting this error on rustfmt 1.4.25.

I am still getting this error on rustfmt 1.5.1-nightly (495b2166 2022-07-03)

It will not - what’s on beta is what will be in the 1.0. We can fix this post-1.0, since the warning can be fixed without being backwards incompatible