Skip to content

Various cosmetic improvements #3767

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 6 commits into from
Mar 11, 2019
Merged

Various cosmetic improvements #3767

merged 6 commits into from
Mar 11, 2019

Conversation

alexreg
Copy link
Contributor

@alexreg alexreg commented Feb 16, 2019

Related to the larger effort of rust-lang/rust#58036.

@oli-obk
Copy link
Contributor

oli-obk commented Feb 16, 2019

reviewing these PRs takes a lot of time. The one on miri took me around an hour for the first round (it was slightly bigger to be fair).

I will not be making this one a priority, I have little enough time for clippy as it is. If noone else has the time and takes this PR up for review in the next two weeks, I will close it to keep our queue free.

@phansch
Copy link
Member

phansch commented Feb 16, 2019

Thanks, this looks like a welcome change in general!

As Oli mentioned, reviewing big PRs takes time, which is something we don't have as much of in Clippy (AFAIK no one is getting paid to work on Clippy currently?) and as it stands currently, we would prioritize bug-fixes and new lints over this PR.

To proceed, I would suggest to split this PR up into smaller ones to make it more easy for us to review these changes. (i.e., re-ordering use statements, changing things that change lots of UI test output, documentation improvements, etc)

I'm going to leave this open in case someone else wants to take on the review of this PR. However, please don't hesitate to open new smaller PRs in the meantime.

@flip1995
Copy link
Member

Since I'm actually paid as a research assistant, I will pick this up and review it. 👍

Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some ui-tests are failing, since the line numbers changed:

failures:
    [ui] ui/block_in_if_condition.rs
    [ui] ui/doc.rs
    [ui] ui/format.rs
    [ui] ui/len_zero.rs
    [ui] ui/lifetimes.rs
    [ui] ui/methods.rs

Except for block_in_if_condition, running tests/ui/update-all-references.sh should be enough. Please make a separate commit for the stderr file updates for easier review.

@@ -5,41 +5,48 @@ fn distinct_lifetimes<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: u8) {}

fn distinct_and_static<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: &'static u8) {}

fn same_lifetime_on_input<'a>(_x: &'a u8, _y: &'a u8) {} // no error, same lifetime on two params
// No error; same lifetime on two params.
fn same_lifetime_on_input<'a>(_x: &'a u8, _y: &'a u8) {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes require a stderr update.

fn rem(self, other: T) { } // no error, wrong return type

fn into_u32(self) -> u32 { 0 } // fine
// No error; not public interface.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes require a stderr update

format!("{:8}", "foo");
format!("{:width$}", "foo", width = 8);
format!("{:+}", "foo"); // warn when the format makes no difference
format!("{:<}", "foo"); // warn when the format makes no difference
format!("{:+}", "foo"); // Warn when the format makes no difference.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes require a stderr update.

@@ -63,7 +63,8 @@ impl PubTraitsToo for One {
}

trait TraitsToo {
fn len(self: &Self) -> isize; // no error, len is private, see #1085
fn len(self: &Self) -> isize;
// No error; `len` is private; see issue #1085.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes require a stderr update.

@bors
Copy link
Contributor

bors commented Feb 21, 2019

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

@phansch phansch added the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label Feb 24, 2019
@flip1995
Copy link
Member

flip1995 commented Mar 9, 2019

Ping from triage @alexreg. Any updates on this? I saw that miri rustfmt rust-installer and stdsimd already got merged. Do you want to get this one up to date?

@alexreg
Copy link
Contributor Author

alexreg commented Mar 9, 2019

@flip1995 Sorry, completely forget about this! Will try to get to it tonight (or tomorrow at worst).

@alexreg
Copy link
Contributor Author

alexreg commented Mar 10, 2019

@flip1995 Okay, I've resolved all the points in your review, except tests/ui/update-all-references.sh didn't work for me... would you mind blessing the tests, if that works for you? You should be able to push directly to my branch.

Thanks a lot for the review in any case!

@flip1995
Copy link
Member

Thanks for all the work! Let's see if travis passes and then merge this.

@alexreg
Copy link
Contributor Author

alexreg commented Mar 10, 2019

@flip1995 No problem. Appreciate you being open to these. Fingers crossed for Travis...

@flip1995
Copy link
Member

flip1995 commented Mar 10, 2019

Some doc tests in clippy_lints are failing. Adding a ignore to them should fix this problem. I'll do this.

@alexreg
Copy link
Contributor Author

alexreg commented Mar 10, 2019

Thanks!

@flip1995
Copy link
Member

@bors r+ p=10

@bors
Copy link
Contributor

bors commented Mar 10, 2019

📌 Commit 72aeaa8 has been approved by flip1995

@bors
Copy link
Contributor

bors commented Mar 10, 2019

⌛ Testing commit 72aeaa8 with merge 1cdac4a...

bors added a commit that referenced this pull request Mar 10, 2019
Various cosmetic improvements

Related to the larger effort of rust-lang/rust#58036.
@flip1995 flip1995 mentioned this pull request Mar 10, 2019
@bors
Copy link
Contributor

bors commented Mar 11, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: flip1995
Pushing 1cdac4a to master...

@bors bors merged commit 72aeaa8 into rust-lang:master Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants