-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Update Clippy #105140
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 #105140
Conversation
Certain types must be enclosed in angle brackets and must have generic arguments substituted to create a working suggestion. For example, if `s` has type `&[u8]`, then `|s| s.len()` may be replaced with `<[u8]>::len`. Previously, Clippy erroneously suggested `[T]::len`.
…redicate, r=lcnr Add `PolyExistentialPredicate` type alias Wrapping `ExistentialPredicate`s in a binder is very common, and this alias already exists for the `PolyExistential{TraitRef,Projection}` types.
…lally allow trait resolution to prove false things during coherence
Add new lint [`misnamed-getters`] ``` changelog: Add new lint [`misnamed-getters`] ``` Closes rust-lang#9769 The current lint matches all methods with a body of just one expression under the form `(&mut?)? <expr>.field` where field doesn't match the name of the method but there is a field of the same type in `<expr>` that matches the name. This allows matching nested structs, for example for newtype wrappers. This may cast the net a bit too wide and cause false positives. I'll run [clippy_lint_tester](https://github.com/mikerite/clippy_lint_tester) on the top crates to see how frequently false positives happen. There also may be room for improvement by checking that the replacement field would work taking into account implementations of `Deref` and `DerefMut` even if the types don't exactly match but I don't know yet how this could be done.
…ip1995 Move `unnecessary_unsafety_doc` to `pedantic` This lint was added in rust-lang#9822. I like the idea, but also agree with rust-lang#9986 as well. I think it should at least not be warn-by-default. This is one of these cases, where I'd like a group between pedantic and restriction. But I believe that users using `#![warn(clippy::pedantic)]` will know how to enable the lint if they disagree with it. --- Since the lint is new: changelog: none r? `@flip1995` since I'd suggest back porting this, the original PR was merged 16 days ago. Closes: rust-lang#9986 (While it doesn't address everything, I believe that this is the best compromise)
…eference, nor a receiver
Don't cross contexts while building the suggestion for `redundant_closure_call` fixes rust-lang#9957 changelog: `redundant_closure_call`: Don't cross macro contexts while building the suggestion
Don't lint `explicit_auto_deref` when the initial type is neither a reference, nor a receiver fixes rust-lang#9901 fixes rust-lang#9777 changelog: `explicit_auto_deref`: Don't lint when the initial value is neither a reference, nor a receiver
Fix `unnecessary_cast` suggestion when taking a reference fixes rust-lang#9906 changelog: `unnecessary_cast`: Fix suggestion when taking a reference
Fix ICE in `unused_rounding` fixes rust-lang#9866 changelog: `unused_rounding`: Fix ICE when using the `_` separator
manual_let_else: keep macro call on suggestion blocks Closes rust-lang#9940 changelog: [`manual_let_else`]: Do not expand macro calls on suggestions
Fix ICE in `result_large_err` with uninhabited enums fixes rust-lang#10005 changelog: `result_large_err`: Fix ICE with uninhabited enums
Rustup r? `@ghost` changelog: none
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
@bors r+ p=1 |
☀️ Test successful - checks-actions |
Finished benchmarking commit (56c241c): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
r? @Manishearth