-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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 #85954
Update Clippy #85954
Conversation
This speeds up the metadata collection by 2-2.5x on my machine. During metadata collection other lint passes don't have to be registered, only the lints themselves.
Early return from LintPass registration when collecting metadata This speeds up the metadata collection by 2-2.5x on my machine. During metadata collection other lint passes don't have to be registered, only the lints themselves. cc rust-lang#7172 r? `@xFrednet` changelog: none
The spans given for derived traits used to not indicate they were from a macro expansion.
Suggest changing usages of ref bindings to match the new type Split out some cases into new lint `ref_binding_to_reference`
…hearth Updated years in copyrigths This PR just updates years in copyrights, nothing more. changelog: none
fix `needless_borrow` suggestion fixes: rust-lang#2610 While I'm working on this, should needless_borrow be split into two? One lint for expressions and another for patterns. In expression it only lints when the compiler inserts a dereference, but for patterns it's whenever a double reference is created. I think at least the case where a double reference is needed should be split into a new lint as it's not 'needless', it can just be done without a ref binding. For illustration: ```rust fn foo(x: &&str) {} match Some("test") { // ref binding is useless here Some(ref x) => *x, _ => (), } match Some("test") { // ref binding is useless here Some(ref x) => x.len(), _ => (), } match Some("test") { // double reference is needed, but could be `Some(x) => foo(&x)` Some(ref x) => foo(x), _ => (), } ``` changelog: Improve the suggestion for `needless_borrow` in patterns to change all usage sites as needed. changelog: Add lint `ref_binding_to_reference`
Move `needless_borrow` to style fixes: rust-lang#3742 rust-lang#7105 should be merged first to fix the false positive. changelog: move `needless_borrow` from `nursery` to `style`
Fix `redundant_closure` for `vec![]` macro in a closure with arguments fixes: rust-lang#7224 changelog: Fix `redundant_closure` for `vec![]` macro in a closure with arguments
…_trait, r=llogiq Fix invalid syntax in `from_iter_instead_of_collect` suggestion First attempt at contributing, hopefully this is a good start and can be improved. :) fixes rust-lang#7259 changelog: [`from_iter_instead_of_collect`] fix invalid suggestion involving "as Trait"
…-lparam, r=giraffate Allow wparam and lparam in similar_names `wparam` and `lparam` are often used as generic parameter names in win32 (for example [WindowProc](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/ms633573(v=vs.85))). This PR adds them to the similar_names exception list. changelog: [`similar_names`] don't treat wparam and lparam as similar
This addresses rust-lang#6722.
…fate Downgrade suspicious_op..._groupings to Nursery This addresses rust-lang#6722. changelog: Downgrade [`suspicious_lint_operations`] to Nursery
…shearth Some SpanlessHash improvements changelog: none * Use `mem::discriminant().hash()` instead of `stable_hash` for simple enums and then use `FxHasher` instead of `StableHasher`. We don't use any StableHash features. * Use `UnHashMap` for maps keyed by spanless hash values.
Some changes occurred in src/tools/clippy. cc @rust-lang/clippy |
@bors rollup=iffy (contains |
@bors r+ |
📌 Commit 647f2b4 has been approved by |
⌛ Testing commit 647f2b4 with merge c9c96e4e19422c4c31598b653b8fa7d1b5fb0673... |
💔 Test failed - checks-actions |
"This check failed" without any message. Seems spurious. @bors retry |
☀️ Test successful - checks-actions |
Bi-weekly Clippy update.
r? @Manishearth