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

Merged
merged 231 commits into from
Dec 7, 2021
Merged

Update Clippy #91590

merged 231 commits into from
Dec 7, 2021

Conversation

flip1995
Copy link
Member

@flip1995 flip1995 commented Dec 6, 2021

Since RLS is now already broken #91543 , we shouldn't be blocked by it anymore. I plan to do the RLS update once new rustc-ap packages are released.

r? @Manishearth

Michael Wright and others added 30 commits November 1, 2021 06:12
…, r=flip1995

Reference `clippy_utils` docs on nightly-rustc and some other documentation updates

The `clippy_utils` crate is now part of the nightly-rustc documentation. See [**very beautiful documentation**](https://doc.rust-lang.org/nightly/nightly-rustc/clippy_utils/). This PR references them in our documentation and updates some other documentation.

changelog: none
Fix false negative in [`match_overlapping_arms`]

changelog: Fix false negative in [`match_overlapping_arms`]
Replace `in_macro` usage with `from_expansion`

changelog: none

Generally replace `in_macro(span)` with `span.from_expansion()`. If we're just trying to avoid expanded code, this seems more appropriate because any kind of expanded code is prone to false positives. One place I did not touch is `macro_use.rs`. I think this lint could use a rewrite so I moved `in_macro` there, the only place it is still used.
…shearth

Remove rustfmt::skip attribute from register_plugins function

r? `@Manishearth` since you added this in rust-lang#540 😄

changelog: none
I found the manual run command really useful, this makes it a bit easier
to type
…effen

Extend author lint

changelog: none

* Print float and int suffixes
* Print labels
* Struct field checks
* Repeat length expression check
* Destructure method calls
* Destructure closures
Add `cargo dev lint` to manually run clippy on a file

I found the manual run command really useful, this makes it a bit easier to type

Not sure if this belongs in the changelog or not

changelog: Add `cargo dev lint` to manually run clippy on a file
TraitKind -> Trait
TyAliasKind -> TyAlias
ImplKind -> Impl
FnKind -> Fn

All `*Kind`s in AST are supposed to be enums.

Tuple structs are converted to braced structs for the types above, and fields are reordered in syntactic order.

Also, mutable AST visitor now correctly visit spans in defaultness, unsafety, impl polarity and constness.
The only reason to use `abort_if_errors` is when the program is so broken that either:
1. later passes get confused and ICE
2. any diagnostics from later passes would be noise

This is never the case for lints, because the compiler has to be able to deal with `allow`-ed lints.
So it can continue to lint and compile even if there are lint errors.
Fix ICE in undocumented_unsafe_blocks

changelog: Fix ICE in [`undocumented_unsafe_blocks`]

closes: rust-lang#7934
Introduce `expr_visitor` and `expr_visitor_no_bodies`

changelog: none

A couple utils that satisfy a *lot* of visitor use cases. Factoring in every possible usage would be really big so I just focused on cleaning clippy_utils.
@flip1995
Copy link
Member Author

flip1995 commented Dec 6, 2021

is RLS still relying on ap- packages?

RLS not, but racer does. And to compile and test RLS in the Rust repo, the rustc-ap packages have to be compiled with the bootstrapped compiler.

@Xanewok If you need help with the move and / or have questions, let me know. I'm quite familiar with the subtree model by now.

@Manishearth
Copy link
Member

@flip1995 ahhh, hmm, that's unfortunate, because AIUI we don't maintain racer so the subtree model won't actually help

@bors
Copy link
Contributor

bors commented Dec 6, 2021

⌛ Testing commit e36e5a5 with merge 6984014604d40f892e66f16ae901c8cf7ba0ebd8...

@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 Dec 6, 2021

💔 Test failed - checks-actions

@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 Dec 6, 2021
@Xanewok
Copy link
Member

Xanewok commented Dec 6, 2021

curl: (6) Could not resolve host: ci-mirrors.rust-lang.org

@bors retry

@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 Dec 6, 2021
@bors
Copy link
Contributor

bors commented Dec 6, 2021

⌛ Testing commit e36e5a5 with merge f060b3edf183f019c7d77a67762ae783a52e658d...

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 6, 2021
Update Clippy

Since RLS is now already broken rust-lang#91543 , we shouldn't be blocked by it anymore. I plan to do the RLS update once new rustc-ap packages are released.

r? `@Manishearth`
@bors
Copy link
Contributor

bors commented Dec 6, 2021

💥 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 Dec 6, 2021
@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)

@matthiaskrgr
Copy link
Member

@bors retry

@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 Dec 6, 2021
@bors
Copy link
Contributor

bors commented Dec 7, 2021

⌛ Testing commit e36e5a5 with merge 953f8c8...

@bors
Copy link
Contributor

bors commented Dec 7, 2021

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 7, 2021
@bors bors merged commit 953f8c8 into rust-lang:master Dec 7, 2021
@rustbot rustbot added this to the 1.59.0 milestone Dec 7, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (953f8c8): comparison url.

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

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 December 7, 2021 09:17
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.