-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rollup of 9 pull requests #113700
Rollup of 9 pull requests #113700
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.
…dy_owned_by, r=cjgillot Use maybe_body_owned_by for multiple suggestions This is a continued work from rust-lang#113567 We have several other suggestions not working for closure, this PR use `maybe_body_owned_by` to fix them and add test cases for them.
…in-selection, r=lcnr Structurally normalize in selection We need to do this because of the fact that we're checking the `Ty::kind` on a type during selection, but goals passed into select are not necessarily normalized. Right now, we're (kinda) unnecessarily normalizing the RHS of a trait upcasting goal, which is broken for different reasons (rust-lang#113393). But I'm waiting for this PR to land before discussing that one. r? `@lcnr`
Rename VecDeque's `rotate_left` and `rotate_right` parameters This pull request introduces a modification to the `VecDeque` collection, specifically the `rotate_left` and `rotate_right` functions, by renaming the parameter associated with these functions. The rationale behind this change is to provide clearer and more consistent naming for the parameter that specifies the number of places to rotate the double-ended queue. By using `n` as the parameter name in both functions, it becomes easier to understand and remember the purpose of the parameter.
… r=GuillaumeGomez rustdoc-json: Add test for private supertrait. Helps with rust-lang#81359 r? `@GuillaumeGomez`
trait system refactor ping: also apply to nested modules of `solve`
…rk-Simulacrum Print artifact sizes in `opt-dist` The Python PGO script printed a nice table of artifact sizes (`librustc_driver.so`, `libLLVM.so`, ...) at the end of the CI run, which was useful to quickly see the sizes of important files. I forgot to port this functionality into the Rust (`opt-dist`) version in rust-lang#112235. This PR fixes that. r? bootstrap
Update Clippy r? `@Manishearth`
…=nikic llvm-wrapper: update for LLVM API change No functional changes intended. Adds an include for `llvm::SmallString`. Previously, this must have been implicitly provided by some of the existing headers. With recent LLVM changes, not anymore: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/20776#01895448-44a4-4a1e-8407-9d41d0186132/209-690
update Miri This fixes a pretty nasty bug in the tag GC. r? ghost
@bors r+ rollup=never p=9 |
🔒 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. |
Successful merges:
rotate_left
androtate_right
parameters #113662 (Rename VecDeque'srotate_left
androtate_right
parameters)solve
#113682 (trait system refactor ping: also apply to nested modules ofsolve
)opt-dist
#113685 (Print artifact sizes inopt-dist
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup