Skip to content

Cannot format too long str in nested match #6647

@A4-Tacks

Description

@A4-Tacks
fn main() {
    match () {
        () => match () {
            () => {
    postfix_snippet(
        "",
    foo("too ling string xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"),
)
    .foo();
            }
        },
    }
}

Run rustfmt output:

fn main() {
    match () {
        () => match () {
            () => {
                postfix_snippet(
        "",
    foo("too ling string xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"),
)
    .foo();
            }
        },
    }
}

versions

  • rustfmt 1.8.0-nightly (040a98af70 2025-08-20)
  • rustc 1.91.0-nightly (040a98af7 2025-08-20)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions