Skip to content

Closure fails to format correctly when there are too many generics  #5401

Open
@maltekliemann

Description

@maltekliemann

I'm using vanilla settings.

let _ = |first, second: SomeType<With, Many, Many, Many, Many, Many, Many, Many, Many, Generic, Arguments>, third| {};

...formats to...

let _ = |first,
         second: SomeType<
    With,
    Many,
    Many,
    Many,
    Many,
    Many,
    Many,
    Many,
    Many,
    Generic,
    Arguments,
>,
         third| {};

Is this expected behavior? I would have expected...

let _ = |first,
         second: SomeType<
             With,
             Many,
             Many,
             Many,
             Many,
             Many,
             Many,
             Many,
             Many,
             Generic,
             Arguments,
         >,
         third| {};

...or (I'm not a big fan of the 1 space indentation for closure arguments)...

let _ = |
    first,
    second: SomeType<
        With,
        Many,
        Many,
        Many,
        Many,
        Many,
        Many,
        Many,
        Many,
        Generic,
        Arguments,
    >,
    third
| {};

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