Skip to content

Multi-line expression after => does not get braces #4004

Description

@RalfJung

In some cases, a multi-line expression in a match arm does not get braces, violating the spec.

This leads to code like this:

pat => fun(
    a,
    b,
    c,
    d,
)

We also don't generate code like this:

if foo { fun(
    a,
    b,
    c,
    d,
)}

so it seems odd to do that for match arms.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-matchesArea: match arms, patterns, blocks, etcI-poor-formattingIssue: poor formatting

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions