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
rustfmt reports error[internal]: left behind trailing whitespace on this code. Also, in a previous iteration of the code (with the if guards in the body of the match arms instead of being guards), rustfmt failed to format the code without reporting any errors or warnings.
Thanks for sharing, though closing as duplicate because the root cause is the same as #4119. If you remove those line-style comments between the patterns towards the end (e.g. // deprecated) then rustfmt will carry on happily.
This change makes it easier to follow the control flow.
I also moved the end-of-line comments attached to some symbols to before
the symbol listing. This allows rustfmt to format the code; otherwise no
formatting occurs (see rust-lang/rustfmt#4750).
Describe the bug
rustfmt reports
error[internal]: left behind trailing whitespace
on this code. Also, in a previous iteration of the code (with theif
guards in the body of the match arms instead of being guards), rustfmt failed to format the code without reporting any errors or warnings.To Reproduce
Here's the code (same as in the playground):
And here's the output:
Expected behavior
The code should be formatted correctly and no errors should be reported.
Meta
1.4.36-nightly (2021-02-07 7de6968)
(current playground version)The text was updated successfully, but these errors were encountered: