Skip to content

Update Clippy #93376

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 66 commits into from
Jan 28, 2022
Merged

Update Clippy #93376

merged 66 commits into from
Jan 28, 2022

Conversation

flip1995
Copy link
Member

nbdd0121 and others added 30 commits January 7, 2022 22:54
This span is unused and is superseded by capture_kind_expr_id in CaptureInfo
Region info is completely unnecessary for upvar capture kind computation
and is only needed to create the final upvar tuple ty. Doing so makes
creation of UpvarCapture very cheap and expose further cleanup opportunity.
* Track the argument when used to initialize simple `let` bindings
* Check if the argument is passed to a function requiring the original type
* Use `multipart_suggestion` rather than multiple suggestions
* Check if the name given in the source code matches the name of the actual type
Closure capture cleanup & refactor

Follow up of rust-lang#89648

Each commit is self-contained and the rationale/changes are documented in the commit message, so it's advisable to review commit by commit.

The code is significantly cleaner (at least IMO), but that could have some perf implication, so I'd suggest a perf run.

r? `@wesleywiser`
cc `@arora-aman`
Update rayon and rustc-rayon

This updates rayon for various tools and rustc-rayon for the compiler's parallel mode.

- rayon v1.3.1 -> v1.5.1
- rayon-core v1.7.1 -> v1.9.1
- rustc-rayon v0.3.1 -> v0.3.2
- rustc-rayon-core v0.3.1 -> v0.3.2

... and indirectly, this updates all of crossbeam-* to their latest versions.

Fixes rust-lang#92677 by removing crossbeam-queue, but there's still a lingering question about how tidy discovers "runtime" dependencies. None of this is truly in the standard library's dependency tree at all.
…, r=lcnr

partially revertish `lazily "compute" anon const default substs`

reverts rust-lang#87280 except for some of the changes around `ty::Unevaluated` having a visitor and a generic for promoted
why revert: <rust-lang#92805 (comment)>

r? `@lcnr`
Remove deprecated LLVM-style inline assembly

The `llvm_asm!` was deprecated back in rust-lang#87590 1.56.0, with intention to remove
it once `asm!` was stabilized, which already happened in rust-lang#91728 1.59.0. Now it
is time to remove `llvm_asm!` to avoid continued maintenance cost.

Closes rust-lang#70173.
Closes rust-lang#92794.
Closes rust-lang#87612.
Closes rust-lang#82065.

cc `@rust-lang/wg-inline-asm`

r? `@Amanieu`
Replace `NestedVisitorMap` with generic `NestedFilter`

This is an attempt to make the `intravisit::Visitor` API simpler and "more const" with regard to nested visiting.

With this change, `intravisit::Visitor` does not visit nested things by default, unless you specify `type NestedFilter = nested_filter::OnlyBodies` (or `All`). `nested_visit_map` returns `Self::Map` instead of `NestedVisitorMap<Self::Map>`. It panics by default (unreachable if `type NestedFilter` is omitted).

One somewhat trixty thing here is that `nested_filter::{OnlyBodies, All}` live in `rustc_middle` so that they may have `type Map = map::Map` and so that `impl Visitor`s never need to specify `type Map` - it has a default of `Self::NestedFilter::Map`.
Instead of having a separate enum variant for types and consts have one but have either a const
or type.
ProjectionPredicate should be able to handle both associated types and consts so this adds the
first step of that. It mainly just pipes types all the way down, not entirely sure how to handle
consts, but hopefully that'll come with time.
Replace use of `ty()` on term and use it in more places. This will allow more flexibility in the
future, but slightly worried it allows items which are consts which only accept types.
Removes uses of ty() where a method is implemented on TypeFoldable, and also directly formats
a Term.
fix op_ref false positive

fixes rust-lang#7572

changelog: `op_ref` don't lint for unnecessary reference in BinOp impl if removing the reference will lead to unconditional recursion
@rust-highfive
Copy link
Contributor

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 Jan 27, 2022
@Manishearth
Copy link
Member

@bors r+ p=1

@bors
Copy link
Collaborator

bors commented Jan 27, 2022

📌 Commit cce9231 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 27, 2022
@bors
Copy link
Collaborator

bors commented Jan 27, 2022

⌛ Testing commit cce9231 with merge 91efdbc34dda060c5711bb3245a941bcc0182c10...

@bors
Copy link
Collaborator

bors commented Jan 27, 2022

💥 Test timed out

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

@bors retry hang in apple and arm builders

@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 27, 2022
@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
Collaborator

bors commented Jan 28, 2022

⌛ Testing commit cce9231 with merge 5ab502c...

@bors
Copy link
Collaborator

bors commented Jan 28, 2022

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 28, 2022
@bors bors merged commit 5ab502c into rust-lang:master Jan 28, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 28, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5ab502c): comparison url.

Summary: This benchmark run did not return any relevant results.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

@flip1995 flip1995 deleted the clippyup branch January 28, 2022 09:50
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.