Skip to content

Support matches! with if guard #5547

Open
@cynecx

Description

@cynecx

rustfmt struggles with matches! and if guards.

fn test() {
    let a = matches!(something.very_very_very.long.even.more.fields, Some(very_long_field_name_name_to_check) if method(very_long_field_name));
}

rustfmt 1.5.1-nightly (c0941dfb 2022-08-21)

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