-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 #113686
Update Clippy #113686
Conversation
…would work Also, lint question_mark for `let...else` clauses that can be simplified to use `?`. This lint isn't perfect as it doesn't support the unstable try blocks.
…r=cjgillot Make simd_shuffle_indices use valtrees This removes the second-to-last user of the `destructure_mir_constant` query. So in a follow-up we can remove the query and just move the query provider function directly into pretty printing (which is the last user). cc `@rust-lang/clippy` there's a small functional change, but I think it is correct?
Fix typos Just a couple misc typos I found changelog: none
Use `cargo build --tests` in CI I noticed that we run a `cargo build` but end up downloading/building a bunch of deps after that for tests in CI https://github.com/rust-lang/rust-clippy/actions/runs/5426673277/jobs/9869019973#step:6:12 https://github.com/rust-lang/rust-clippy/actions/runs/5426673277/jobs/9869019973#step:7:11 This builds the tests in the build step too, it may speed up runs by downloading/building more in parallel changelog: none
…llogiq `let_and_return`: lint 'static lifetimes, don't lint borrows in closures Fixes rust-lang#11056 Now also ignores functions returning `'static` lifetimes, since I noticed the `stdin.lock()` example was still being linted but doesn't need to be since rust-lang#93965 changelog: none
Add `SPEEDTEST` In the `master` branch, we currently don't have any way to test the performance of a single lint in changes. This PR adds `SPEEDTEST`, the environment variable which lets you do a speed test on a lint / category of tests with various configuration options. Maybe we should merge this with `lintcheck` 🤔 See the book page for more information. changelog:none
[`missing_fields_in_debug`]: make sure self type is an adt Fixes rust-lang#11063, another ICE that can only happen in core. This lint needs the `DefId` of the implementor to get its fields, but that ICEs if the implementor does not have a `DefId` (as is the case with primitive types, e.g. `impl Debug for bool`), which is where this ICE comes from. This PR changes the check I added in rust-lang#10897 to be more... robust against `Debug` implementations we don't want to lint. Instead of just checking if the self type is a type parameter and "special casing" one specific case we don't want to lint, we should probably rather just check that the self type is either a struct, an enum or a union and only then continue. That prevents weird edge cases like this one that can only happen in core. Again, I don't know if it's even possible to add a test case for this since one cannot implement `Debug` for primitive types outside of the crate that defined `Debug` (core). I did make sure that this PR no longer ICEs on `impl<T> Debug for T` and `impl Debug for bool`. Maybe writing such a test is possible with `#![no_core]` and then re-defining the `Debug` trait or something like that...? changelog: [`missing_fields_in_debug`]: make sure self type is an adt (fixes an ICE in core) r? `@Alexendoo` (reviewed the last PRs for this lint)
new lint: `type_id_on_box` Closes rust-lang#7687. A new lint that detects calling `.type_id()` on `Box<dyn Any>` (and not on the underlying `dyn Any`), which can make up for some pretty confusing bugs! changelog: new lint: [`type_id_on_box`]
If question_mark is allowed, there is no overlap any more, so we can just not suppress it.
Update Clippy r? `@Manishearth`
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
☔ The latest upstream changes (presumably #113591) made this pull request unmergeable. Please resolve the merge conflicts. |
lol |
…ednet don't hide lifetimes for `LateContext` Running `cargo dev new_lint --type methods` creates the lint file with hidden lifetimes for the `LateContext` parameter (i.e. `&LateContext`, when it should be `&LateContext<'_>`). This is already warned on with `#![warn(rust_2018_idioms)]`, so clippy should not use hidden lifetimes changelog: none
Remove clippy_test_deps from Cargo.toml
@rustbot review |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (4eaad89): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResultsThis 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 656.866s -> 657.794s (0.14%) |
r? @Manishearth