Skip to content

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

Merged
merged 2 commits into from
Nov 11, 2015

Conversation

goyox86
Copy link
Contributor

@goyox86 goyox86 commented Nov 5, 2015

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

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)


Ok((outputs, trans))
})
{
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Member

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!

@goyox86 goyox86 force-pushed the goyox86/rustfmting-librustc_driverII branch from 52730af to 82f1391 Compare November 8, 2015 01:26
@bors
Copy link
Collaborator

bors commented Nov 8, 2015

☔ The latest upstream changes (presumably #29674) made this pull request unmergeable. Please resolve the merge conflicts.

@nikomatsakis
Copy link
Contributor

seems ok, r=me, once rebased, presuming that a bug has been filed about the string constant and comment paragraphization

@nrc
Copy link
Member

nrc commented Nov 9, 2015

As of a few minutes ago, rustfmt should no longer split comments

@nrc
Copy link
Member

nrc commented Nov 9, 2015

@nikomatsakis I don't see a comment about a string constant?

@nikomatsakis
Copy link
Contributor

@nrc there was a mis-formatted string constant, which I believe was fixed by hand in this commit goyox86@82f1391

@nrc
Copy link
Member

nrc commented Nov 10, 2015

I think that is https://github.com/nrc/rustfmt/issues/397

@goyox86 goyox86 force-pushed the goyox86/rustfmting-librustc_driverII branch from 82f1391 to 4f050bf Compare November 10, 2015 20:50
@nikomatsakis
Copy link
Contributor

@bors r+ thanks!

@bors
Copy link
Collaborator

bors commented Nov 11, 2015

📌 Commit 4f050bf has been approved by nikomatsakis

@bors
Copy link
Collaborator

bors commented Nov 11, 2015

⌛ Testing commit 4f050bf with merge 8c743a9...

bors added a commit that referenced this pull request Nov 11, 2015
…r=nikomatsakis

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
@bors bors merged commit 4f050bf into rust-lang:master Nov 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants