-
Notifications
You must be signed in to change notification settings - Fork 883
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
Don't move comments around, or at least move them up instead of down #3994
Labels
Comments
Agreed, though I think this is a duplicate of #3255. I think rustfmt is assuming the same-line comment after the opening |
Yes, this is a duplicate of #3255 indeed. |
Closing as duplicate of #3255. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For some reason, rustfmt arbitrarily decides to move the comment around in the following snippet:
(I am saying "arbitrarily" as this page has no explanation for why this happens)
This becomes:
This is bad for 2 reasons:
if true
, and a comment explaining something should not come after the thing already happened! Currently, rustfmt actively degrades the quality of such comments. The reformatted code looks like the comment is explaining theprintln!
.I am very worried now how many such comments that were in the compiler are wrong / confusing now because of this. :/
The text was updated successfully, but these errors were encountered: