You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is caused because original code snippet is used, since currently rustfmt is not handling comments in expressions like:
(true// some comment
| false)
Submitted PR #4629 with a proposed solution to the extra indentation issue. Did not try to solve the comment issue, as the extra indentation is a general problem when original code snippet is used during macro body formatting.
Describe the bug
If I start with this code and repeatedly run rustfmt, I get:
==>>
==>>
etc. After enough iterations the
| false)
stops moving but it's way off to the right.This bug doesn't appear without the comment or outside a macro. Note that this macro returns a pattern, and that or-patterns are an unstable feature.
To Reproduce
This works on a fresh project without a rustfmt.toml and with both stable and nightly rustfmt.
Expected behavior
The absence of a
| false)
glider trying to escape from the file.Meta
rustfmt 1.4.24-stable (eb894d5 2020-11-05)
&&rustfmt 1.4.29-nightly (70ce182 2020-12-04)
rustfmt
andcargo fmt
The text was updated successfully, but these errors were encountered: