Skip to content
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

Update Clippy #82514

Merged
merged 169 commits into from
Feb 25, 2021
Merged

Update Clippy #82514

merged 169 commits into from
Feb 25, 2021

Conversation

flip1995
Copy link
Member

Bi-weekly Clippy update.

This updates Cargo.lock, so probably needs rollup=never. (0046d7c)

a6dd9b9 fixes things in Clippy, so that it can be build and tested. This needs proper fixing in Clippy, but I didn't want this to block the sync.

r? @Manishearth

camsteffen and others added 30 commits January 2, 2021 18:25
The default value for a field type does not necessarily match the
default value for that field in the struct Default.
There is already an assertion that consecutive lines assign to a struct
field.
[beta] Backport of rust-lang#6375 - field_reassign_with_default fix

With the pinned nightly we can test backports to our beta branch now 🎉

cc rust-lang#6515

changelog: beta 1.50: Backport of private fields fix in [`field_reassign_with_default`] lints
This rewrite gets rid of complicated visitors, by using the lint infrastructure as much as possible
Backport remerge

changelog: none

r? `@ghost`
Update changelog for 1.51

~~Don't merge yet. This is the last step of the release process.~~ Release process for 1.50 is done, this can now be merged.

[Rendered](https://github.com/flip1995/rust-clippy/blob/changelog/CHANGELOG.md)

changelog: none
Rework use_self impl based on ty::Ty comparison rust-lang#3410 | Take 2

This builds on top of rust-lang#5531

I already reviewed and approved the commits by `@montrivo.` So only the review of my commits should be necessary.

I would also appreciate your review `@montrivo,` since you are familiar with the challenges here.

Fixes rust-lang#3410 and Fixes rust-lang#4143 (same problem)
Fixes rust-lang#2843
Fixes rust-lang#3859
Fixes rust-lang#4734 and fixes rust-lang#6221
Fixes rust-lang#4305
Fixes rust-lang#5078 (even at expression level now 🎉)
Fixes rust-lang#3881 and Fixes rust-lang#4887 (same problem)
Fixes rust-lang#3909

Not yet: rust-lang#4140 (test added)

All the credit for the fixes goes to `@montrivo.` I only refactored and copy and pasted his code.

changelog: rewrite [`use_self`] lint and fix multiple (8) FPs. One to go.
bors and others added 16 commits February 24, 2021 09:43
Factor out `clippy_utils` crate

As discussed in rust-lang/rust-clippy#6746, this PR factors out `clippy_lints::utils` as its own crate, `clippy_utils` .

This change will allow `clippy_utils` to be used in lints outside of Clippy.

There is no plan to publish this crate on `crates.io` (see rust-lang/rust-clippy#6746 (comment)). Dependent crates should obtain it from GitHub.

changelog: Factor out `clippy_utils` so it can be used by external tools (not published)
…-lints, r=flip1995

Move conf.rs back into clippy_lints

This is an alternative solution to rust-lang#6785 to fix the CI break caused by rust-lang#6756.

changelog: none
Moves the lint back from pedantic to style group.
The lint default now only warns on names that are completely capitalized, like "WORD"
and only if the name is longer than 2 chars (so that names where each of the letter represents a word are still distinguishable).
For example: FP (false positive) would still be "valid" and not warned about (but EOF would warn).

A "upper_case_acronyms_aggressive: true/false" config option was added that restores the original lint behaviour to warn
on any kind of camel case name that had more than one capital letter following another capital letter.
Add OpenDNS to `doc-valid-idents`

changelog: This commit adds `"OpenDNS"` to doc-valid-idents to avoid `doc_markdown` false positives.
fix sentence / address review comments
…ip1995

move upper_case_acronyms back to style, but make the default behaviour less aggressive by default (can be unleashed via config option)

Previous discussion in the bi-weekly clippy meeting for reference: https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Meeting.202021-02-23/near/227458019

Move the `upper_case_acronyms` lint back to the style group.
Only warn on fully-capitalized names by default.
Add add a clippy-config option `upper-case-acronyms-aggressive: true/false` to enabled more aggressive linting on
all substrings that could be capitalized acronyms.

---
changelog: reenable upper_case_acronyms by default but make the more aggressive linting opt-in via config option
Rustup

r? `@ghost`

changelog: None
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 25, 2021
@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Feb 25, 2021

📌 Commit 0046d7c has been approved by Manishearth

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 25, 2021
@flip1995
Copy link
Member Author

@bors rollup=iffy (updates Cargo.lock)

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 25, 2021
Rollup of 16 pull requests

Successful merges:

 - rust-lang#75807 (Convert core/num/mod.rs to intra-doc links)
 - rust-lang#80534 (Use #[doc = include_str!()] in std)
 - rust-lang#80553 (Add an impl of Error on `Arc<impl Error>`.)
 - rust-lang#81167 (Make ptr::write const)
 - rust-lang#81575 (rustdoc: Name fields of `ResolutionFailure::WrongNamespace`)
 - rust-lang#81713 (Account for associated consts in the "unstable assoc item name colission" lint)
 - rust-lang#82078 (Make char and u8 methods const)
 - rust-lang#82087 (Fix ICE caused by suggestion with no code substitutions)
 - rust-lang#82090 (Do not consider using a semicolon inside of a different-crate macro)
 - rust-lang#82213 (Slices for vecs)
 - rust-lang#82214 (Remove redundant to_string calls)
 - rust-lang#82220 (fix the false 'defined here' messages)
 - rust-lang#82313 (Update normalize.css to 8.0.1)
 - rust-lang#82321 (AST: Remove some unnecessary boxes)
 - rust-lang#82364 (Improve error msgs when found type is deref of expected)
 - rust-lang#82514 (Update Clippy)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ebe67d9 into rust-lang:master Feb 25, 2021
@rustbot rustbot added this to the 1.52.0 milestone Feb 25, 2021
@flip1995 flip1995 deleted the clippyup branch February 26, 2021 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.