Skip to content

Stable rustfmt panics on nested tuple access #4511

Closed
@khoek

Description

@khoek

Describe the bug

The expression a.0.1; on a line in the body of a function panics rustfmt.

To Reproduce

Try to format:

fn main() {
    a.0.1;
}

Expected behavior

No crash, since this is well formed rust code (and would compile if we cluttered the reproducer with a definition of a).

Meta

  • rustfmt version: rustfmt 1.4.20-stable (48f6c32 2020-08-09)
  • From where did you install rustfmt?: rustup
  • How do you run rustfmt: rustfmt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPanic, non-idempotency, invalid code, etc.duplicate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions