Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Nadrieril opened this issue Sep 3, 2019 · 0 comments · Fixed by #3775
Closed

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

Nadrieril opened this issue Sep 3, 2019 · 0 comments · Fixed by #3775
Labels
a-macros bug Panic, non-idempotency, invalid code, etc. poor-formatting

Comments

@Nadrieril
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-macros bug Panic, non-idempotency, invalid code, etc. poor-formatting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants