Skip to content

Non-multiple of four indentation in closure arg pattern #3267

Description

@dtolnay

The following unformatted line:

fn f() {
    let y = x.into_iter().map(|AaaaaaAaaaaaaaaaa{bbbbbb_bbbb,ccc_ccccccc}|());
}

currently gets formatted as:

fn f() {
    let y = x.into_iter().map(
        |AaaaaaAaaaaaaaaaa {
             bbbbbb_bbbb,
             ccc_ccccccc,
         }| (),
    );
}

This has some lines with 13 and 9 space indentation, which contradicts the indentation convention in the style guide RFC.

Each level of indentation must be four spaces (that is, all indentation outside of string literals and comments must be a multiple of four).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions