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

Merged
merged 140 commits into from
Mar 26, 2021
Merged

Update Clippy #83480

merged 140 commits into from
Mar 26, 2021

Conversation

flip1995
Copy link
Member

Bi-weekly Clippy update.

r? @Manishearth

matthiaskrgr and others added 30 commits February 26, 2021 21:31
Fixes rust-lang#6803

changelog: upper_case_acronyms: ignore public items
When a method starts with `to_` and ends with `_mut`, it should expect a `&mut self` parameter,
otherwise `&self`.
This will be removed in the next sync, once beta is at 1.52. Until then
this hack avoids to put `cfg(bootstrap)` into Clippy.
Use sym::Iterator instead of paths::ITERATOR

Since `sym::Iterator` was added to diagnostic_item, it's time to remove `paths::ITERATOR`.
ref: rust-lang#5393

changelog: Add `is_trait_method` to `clippy_utils`
changelog: Remove `paths::ITERATOR`
inconsistent_struct_constructor: try to make message and lint description a bit clearer

changelog: inconsistent_struct_constructor: try to make message and lint description a bit clearer

r? `@ghost`
Fix suggestion for `explicit_deref_methods`. Sometimes `&**` is needed, sometimes nothing is needed.
Allow `explicit_deref_methods` to trigger in a few new contexts.
`explicit_deref_methods` will now consider ufcs calls
`explicit_deref_methods` improvements

Breaking up rust-lang#6837

changelog: `explicit_deref_methods` will lint chained `deref` calls and ufcs style calls
…_with_default_with_other_ctors, r=phansch

mem_replace_with_default: recognize some std library ctors

fixes rust-lang#6562
changelog: mem_replace_with_default: recognize some common constructors equivalent to `Default::default()`
…iraffate

Implement new lint: if_then_some_else_none

Resolves rust-lang#6760

changelog: Added a new lint: `if_then_some_else_none`
replace span_lint with span_lint_and_sugg along with error message

fixes: rust-lang#6874
changelog: none

apologies if this may not be the most idiomatic way of doing it, any advice on changes (if any) would be greatly appreciated.
bors and others added 12 commits March 24, 2021 18:42
…latten, r=llogiq

Fix false positive in `manual_flatten`

This pull request fixes false positive in `manual_flatten` in case using a slice of references .

closes: rust-lang#6893

changelog: fix false positive in `manual_flatten`
Fix `new_ret_no_self` false positive

fixes: rust-lang#1724

changelog: Fix false positive with `new_ret_no_self` when returning `Self` with different generic arguments
Check for `.to_string().into_bytes()` in string_lit_to_bytes

fixes rust-lang#6927

changelog: Add a check for `into_bytes()` to string_lit_to_bytes lint
Rustup

r? `@ghost`

changelog: none
@rust-highfive
Copy link
Collaborator

Some changes occurred in src/tools/clippy.

cc @rust-lang/clippy

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 25, 2021
@flip1995
Copy link
Member Author

@bors rollup=iffy (Cargo.lock file modified)

@Dylan-DPC-zz
Copy link

r? @Dylan-DPC

@bors r+

@bors
Copy link
Contributor

bors commented Mar 25, 2021

📌 Commit 0f1ff45 has been approved by Dylan-DPC

@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 Mar 25, 2021
@bors
Copy link
Contributor

bors commented Mar 26, 2021

⌛ Testing commit 0f1ff45 with merge 1316702...

@bors
Copy link
Contributor

bors commented Mar 26, 2021

☀️ Test successful - checks-actions
Approved by: Dylan-DPC
Pushing 1316702 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 26, 2021
@bors bors merged commit 1316702 into rust-lang:master Mar 26, 2021
@rustbot rustbot added this to the 1.53.0 milestone Mar 26, 2021
@flip1995 flip1995 deleted the clippyup branch March 26, 2021 09:13
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.