slava-sh / rust-bundler

Creates a single-source-file version of a Cargo package
https://crates.io/crates/bundler
MIT License
21 stars 8 forks source link

..= causes rustfmt fail #4

Open izik1 opened 4 years ago

izik1 commented 4 years ago

attempting to bundle the following file

fn f() {
    let a = 0;
    for x in 1..=a {}
}

causes a rustfmt failure:

error: expected `{`, found `=`
 --> stdin:1:45
  |
1 | fn spread_at ( ) { let a = 0 ; for x in 1 ..= a { } }
  |                                             ^

thread 'main' panicked at 'rustfmt returned no code', src/libcore/option.rs:1188:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Notice, however, that manually running rustfmt on that snippet works.