Skip to content

Crash on tuple of tuples access #4410

Closed

Description

@kov

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

Activity

  1. added
    C-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICE
    on Sep 2, 2020
  2. changed the title [-]Crash on [/-] [+]Crash on tuple of tuples access[/+] on Sep 2, 2020
  3. kov commented on Sep 2, 2020

    @kov
    Author

    Duplicate of #4355

  4. added
    S-duplicateStatus: duplicate of another issue or PR
    and removed on Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICES-duplicateStatus: duplicate of another issue or PR

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions