Skip to content

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

Open
@programmerjake

Description

@programmerjake

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)

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