Closed
Description
Describe the bug
Given:
fn get_hashes() { x. 0. 0 }
I get:
thread 'main' panicked at 'bad span: `.`: ` 0`', src/tools/rustfmt/src/source_map.rs:52:13
To Reproduce
$ rustfmt test.rs
thread 'main' panicked at 'bad span: `.`: ` 0`', src/tools/rustfmt/src/source_map.rs:52:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Expected behavior
Not panic.
Meta
- rustfmt version:
rustfmt 1.4.22-nightly (97d03010 2020-10-04)
- From where did you install rustfmt?:
rustup
- How do you run rustfmt:
rustfmt