-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Goyox86/rustfmting librustc driver II #29650
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
Goyox86/rustfmting librustc driver II #29650
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
|
||
Ok((outputs, trans)) | ||
}) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woah. I guess I see why it indented this so far -- but often times you want a trailing closure to only be 4 space indented. Is there a known issue on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rustfmt indents the closure at a "visual" level because it's not the last item in the chain. If we'd indent this at a "block" level, the following .collect()
would be out of place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like maybe the issue where large closures should be block indented rather than visual? I couldn't find the issue for it, but I know there is one!
52730af
to
82f1391
Compare
☔ The latest upstream changes (presumably #29674) made this pull request unmergeable. Please resolve the merge conflicts. |
seems ok, r=me, once rebased, presuming that a bug has been filed about the string constant and comment paragraphization |
As of a few minutes ago, rustfmt should no longer split comments |
@nikomatsakis I don't see a comment about a string constant? |
@nrc there was a mis-formatted string constant, which I believe was fixed by hand in this commit goyox86@82f1391 |
I think that is https://github.com/nrc/rustfmt/issues/397 |
82f1391
to
4f050bf
Compare
@bors r+ thanks! |
📌 Commit 4f050bf has been approved by |
Hi Rustaceans!
This is the secong take on running latest rustfmt on librustc_driver!
All fixups made in #29033 were done (also rustfmt got better).
//cc @nrc