-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
run rustfmt on librustc_passes folder #33951
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
self.tcx.sess.add_lint(CONST_ERR, | ||
expr.id, | ||
expr.span, | ||
format!("constant evaluation error: {}. This will \ | ||
become a HARD ERROR in the future", |
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.
Becomes weirdly misaligned.
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.
I didn't find an existing rustfmt issue, so I filed rust-lang/rustfmt#1026 -- @nagisa, is that what you meant?
I'd be happy to r+ but for this tidy failure: https://travis-ci.org/rust-lang/rust/builds/133743527#L1234 seems like a bug in rustfmt? |
@nikomatsakis I roll up please. I removed that line manually. |
@srinivasreddy did you file some sort of bug in rustfmt repo? |
nope.AFAIK, Not required. rustfmt does not panic when it crosses 100 chars limit in a line and goes on formatting, And it just gives you sorry message on console. I guess it is an expected behaviour. Let's confirm with what @nrc says. |
@srinivasreddy seems like this bug rust-lang/rustfmt#1080 fits the bill, sort of. |
@bors r+ rollup |
📌 Commit faa039f has been approved by |
… r=nikomatsakis run rustfmt on librustc_passes folder
☔ The latest upstream changes (presumably #34424) made this pull request unmergeable. Please resolve the merge conflicts. |
🔒 Merge conflict |
are not allowed, use unit structs and \ | ||
enum variants instead") | ||
.span_help(span, "remove trailing `()` to make a unit \ | ||
.span_help(span, | ||
"remove trailing `()` to make a unit \ | ||
struct or unit enum variant") |
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.
Strange indent.
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.
All of these are due to the same reason and all should be fixed up manually.
☔ The latest upstream changes (presumably #34907) made this pull request unmergeable. Please resolve the merge conflicts. |
Just in general my feeling is that if there is "suboptimal" formatting we should certainly make issues about it and discuss it as rustfmt guidelines get hammered out, but in general we want to adopt automated formatting just because it everyone's life easier -- even if there are some corner cases where hand-formatting might improve things. (Most of the examples raised here I personally could go either way, I admit.) |
@srinivasreddy want to rebase this? |
@nikomatsakis Done. |
☔ The latest upstream changes (presumably #35015) made this pull request unmergeable. Please resolve the merge conflicts. |
@nikomatsakis Done. |
@bors r+ |
📌 Commit a6c9404 has been approved by |
⌛ Testing commit a6c9404 with merge 1fd8b88... |
…akis run rustfmt on librustc_passes folder
… r=nikomatsakis run rustfmt on librustc_passes folder
⛄ The build was interrupted to prioritize another pull request. |
⛄ The build was interrupted to prioritize another pull request. |
No description provided.