Skip to content

Rustfmt removes leading pipe from patterns #3973

@oli-obk

Description

@oli-obk
match foo {
    | "foo"
    | "bar"
    => {}
    _ => {}
}

gets reformatted to

match foo {
    "foo"
    | "bar" => {}
    _ => {}
}

I can understand that the => on its own line needs an RFC, but the removal of the leading pipe makes that rust language feature essentially unusable.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions