Skip to content

if in match arm should have multi-line formatting like an if expression #1099

Closed
@nrc

Description

@nrc

I.e., if a condition spans multiple lines, the lines should be aligned. E.g.,

                ItemKind::Enum(_, Generics { ref ty_params, .. })
-                    if ty_params.is_empty() &&
-                    attr::contains_name(&annitem.attrs, "derive_Copy") => {
+                    if ty_params.is_empty()
+                       && attr::contains_name(&annitem.attrs, "derive_Copy") => {

Whilst I've labelled this easy, it is probably good as a second bug, rather than a first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueIssues up for grabs, also good candidates for new rustfmt contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions