Skip to content

Formatting of macro calls changed; causes "line exceeded maximum width" #3774

Closed
@Nadrieril

Description

@Nadrieril

I just upgraded from 2019-03-22 to 2019-09-03, and rustfmt seems to have changed how it handles macro calls. It rewraps the following lines into a single line and then complains about "line formatted, but exceeded maximum width". I tried adding line breaks or braces to avoid the error but of course it formats them away.

-        Lam(_, _, _) | Pi(_, _, _) | Let(_, _, _, _) | Embed(_) | Var(_) => {
-            unreachable!()
-        }
+        Lam(_, _, _) | Pi(_, _, _) | Let(_, _, _, _) | Embed(_) | Var(_) => unreachable!(),

I have a few other similar issues, and all of them occur when the body of a match branch is a single macro call.
Looks related to #3721.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions