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 #81560

Merged
merged 147 commits into from
Jan 31, 2021
Merged

Update Clippy #81560

merged 147 commits into from
Jan 31, 2021

Conversation

flip1995
Copy link
Member

r? @Manishearth

Biweekly Clippy update (2 days late)

kai.giebeler and others added 30 commits November 27, 2020 01:42
fixes rust-lang#6503

changelog: match_like_matches_macro: strip refs in suggestion (rust-lang#6503)
Closes rust-lang#6425

Looks for ends_with methods calls with case sensitive extensions.
This was left as default and caused a CI failure for the
case_sensitive_file_extension_comparison lint.
It happened because `zero_sized_map_values` used `layout_of` with types
from type aliases, which is essentially the same as the ICE 4968.
Add: attempt to remove address of expressions from the scrutinee expression before adding references to the pattern
Remove duplication in the manual_ok_or lint example

changelog: none
single_match: suggest `if` over `if let` when possible

fixes: rust-lang#173
changelog: single_match: suggest `if` over `if let` when possible
…sions, r=llogiq

Case sensitive file extensions

Closes rust-lang#6425

Looks for ends_with methods calls with case sensitive extension comparisons.

changelog: Add new lint that warns about case-sensitive file extension comparisons.
This is now handled by unknown_lints
JohnTitor and others added 9 commits January 28, 2021 15:09
…jasper

Make more traits of the From/Into family diagnostic items

Following traits are now diagnostic items:
- `From` (unchanged)
- `Into`
- `TryFrom`
- `TryInto`

This also adds symbols for those items:
- `into_trait`
- `try_from_trait`
- `try_into_trait`

Related: rust-lang/rust-clippy#6620 (comment)
Improve safety of `LateContext::qpath_res`

This is my first rustc code change, inspired by hacking on clippy!

The first change is to clear cached `TypeckResults` from `LateContext` when visiting a nested item. I took a hint from [here](https://github.com/rust-lang/rust/blob/5e91c4ecc09312d8b63d250a432b0f3ef83f1df7/compiler/rustc_privacy/src/lib.rs#L1300).

Clippy has a `qpath_res` util function to avoid a possible ICE in `LateContext::qpath_res`. But the docs of `LateContext::qpath_res` promise no ICE. So this updates the `LateContext` method to keep its promises, and removes the util function.

Related: rust-lang/rust-clippy#4545

CC ````````````@eddyb```````````` since you've done related work
CC ````````````@flip1995```````````` FYI
Rustup

changelog: Deprecate `unknown_clippy_lints` (integrated in `unknown_lints`)

r? `@ghost`
No lazy static regex

r? `@llogiq`

rust-lang#6500

regex is unnecessary for this lint (rust-lang/rust-clippy#6500 (comment))
lazy_static is unnecessary. The std lazy feature should be  used instead.

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

@bors r+ p=1

@bors
Copy link
Contributor

bors commented Jan 30, 2021

📌 Commit 21758bf 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 Jan 30, 2021
@bors
Copy link
Contributor

bors commented Jan 30, 2021

⌛ Testing commit 21758bf with merge 3c29309c0e083871e256953296ff8e13db0d0ea3...

@Mark-Simulacrum
Copy link
Member

@bors retry

Prioritizing #81565

@m-ou-se
Copy link
Member

m-ou-se commented Jan 30, 2021

@bors retry

Yielding to #81565.

@m-ou-se
Copy link
Member

m-ou-se commented Jan 30, 2021

Oh, race condition. :)

@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Contributor

bors commented Jan 30, 2021

⌛ Testing commit 21758bf with merge b3897e3...

@bors
Copy link
Contributor

bors commented Jan 31, 2021

☀️ Test successful - checks-actions
Approved by: Manishearth
Pushing b3897e3 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 31, 2021
@bors bors merged commit b3897e3 into rust-lang:master Jan 31, 2021
@rustbot rustbot added this to the 1.51.0 milestone Jan 31, 2021
@flip1995 flip1995 deleted the clippyup branch January 31, 2021 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.