Skip to content

Fail to format match arm when other arm has long line #3156

Open

Description

Rustfmt is not formatting the let a=0; part in this reduced testcase:

fn f() {
    let mut a = Vec::new();
    a.push(match 0 {
        0 => {let a=0;""}
        _ => r#"
--------------------loong line----------------------------------------------------------------------.
"#,
    });
}

I am using rustfmt version:
rustfmt 0.99.6-nightly (750b252 2018-10-18)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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