Skip to content

rustfmt fails to format array that contains more than one struct lit which exceeds max_width #4403

Open
@farrel

Description

@farrel

Describe the bug

I have a const array of structs. If the array has more than 8 elements rustfmt will not format the file.

To Reproduce

Run rstfmt on the contents of https://gist.github.com/farrel/c982304bdefe5c2ee2c8ee8207a3e0ff

Expected behavior

The file should be formatted.

Meta

  • rustfmt version: rustfmt 1.4.17-stable (8a93416 2020-07-20)
  • From where did you install rustfmt?: rustup
  • How do you run rustfmt: rustfmt, cargo-fmt, vim integration (all fail)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions