-
Notifications
You must be signed in to change notification settings - Fork 13k
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 #91154
Update Clippy #91154
Conversation
…, 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.
Rustup Re-sync, because I didn't get to syncing things back to rustc. r? `@ghost` changelog: none
Some changes occurred in src/tools/clippy. cc @rust-lang/clippy |
This comment has been minimized.
This comment has been minimized.
@bors r+ |
📌 Commit b95545b has been approved by |
Update Clippy r? `@Manishearth` Delayed Clippy sync. I didn't get to it over the weekend..
@bors p=1 (kinda bitrotty) |
⌛ Testing commit b95545b with merge 64a23715ae719461cd7759c26ed1a98f513e540a... |
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
Did this function change? |
Yes 413d255 changed that function. So we will have to do a RLS sync first. |
Ohoh, we can't update RLS, because we can't bump the Clippy version, because the Clippy packages have edition 2021, so cargo update -p clippy_lints
Updating git repository `https://github.com/rust-lang/rust-clippy`
Updating crates.io index
Updating git repository `https://github.com/rust-lang/rust-clippy`
error: no matching package named `clippy_lints` found
location searched: https://github.com/rust-lang/rust-clippy?rev=0c8799da5aabf72aee26053075d2bd73ef9f7789
required by package `rls v1.41.0 (/home/pkrones/rust-lang/rls)` Let's investigate... |
Since we missed the time frame to get this into this release, I will close this in favor of the sync I'll do on Thursday. |
r? @Manishearth
Delayed Clippy sync. I didn't get to it over the weekend..