-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Format src/test/ui-fulldeps
#98850
Format src/test/ui-fulldeps
#98850
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
Hm, maybe not so easy then. Weird that it passed locally on Windows and Linux. |
This comment has been minimized.
This comment has been minimized.
Oh duh, I just need to do a All the additional changes are literally just converting |
Ok, so that passed. The only question now is if this something we actually want? My argument is that this was very easy to do (stage 2 blunder aside). There were only a few places that needed manual adjustment to take in to account of the comment formatting which suggests formatting these will not be a burden. And even if these tests are eventually moved, at least they'll start off formatted in the rustc style. |
impl LintPass for Foo { //~ERROR implementing `LintPass` by hand | ||
impl LintPass for Foo { | ||
//~^ERROR implementing `LintPass` by hand |
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.
This (and below) was the one place were I think the formatting was slightly better originally. But it's not too bad. IMHO, the best to fit in with the formatting would be if we had a way to point downward at error lines. But we don't.
fn bar<T>(f: extern "Rust" fn(&T), t: &T) { } | ||
fn bar<T>(f: fn(&T), t: &T) {} |
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.
Oh, hm. My eyes glanced over that initially. Removing code seems more of an actual problem even for fulldeps. I wasn't aware rustfmt did that. I'm not sure if that matters here but it's got me concerned enough to worry about doing this at all. And the issue (#18502) is from pre-1.0 Rust which makes it awkward for me to tell if this matters.
I'm fairly confident that the other tests aren't sensitive to formatting (or at least they aren't intending to be) but this is something different.
Closing this as I'm no longer sure it's a good idea (though I would still like to fmt at least the stdlib tests in |
These tests are relatively special as they don't need a lot of UI-testing comments (other than a small number of error annotations). Honestly, this was easier to do than describe. A simple fmt then bless seems to have worked out ok, only needing a very few manual fixups where an
ERROR
was moved to the next line (seeinternal-lints/lint_pass_impl_without_macro.rs
andlint-plugin-forbid-cmdline.rs
).