Closed
Description
Describe the bug
rustfmt crashes:
thread 'main' panicked at 'bad span: .
: ``', src/tools/rustfmt/src/source_map.rs:52:13
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
It seems to be caused by having the tuple of tuples access chained. Removing the final .0 and .1 makes it disappear.
To Reproduce
impl Drop for LockGuard {
fn drop(&mut self) {
LockMap::unlock(&self.0.0, &self.0.1);
}
}
Meta
- rustfmt version: rustfmt 1.4.20-nightly (48f6c32 2020-08-09)
- From where did you install rustfmt?: rustup
- How do you run rustfmt: cargo fmt, but it reproduces when running manually too