Skip to content
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

Closed
wants to merge 154 commits into from
Closed

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

y21 and others added 30 commits June 18, 2023 22:20
…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.
compiler-errors and others added 11 commits July 14, 2023 15:02
…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
…=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
@rustbot rustbot added A-meta Area: Issues about the rust-lang/rust repository. A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative rollup A PR which is a rollup labels Jul 14, 2023
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=9

@bors
Copy link
Contributor

bors commented Jul 14, 2023

📌 Commit b5687c5 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 14, 2023
@bors
Copy link
Contributor

bors commented Jul 14, 2023

🔒 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 self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout rollup-af26qss (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self rollup-af26qss --force-with-lease (update this PR)

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 git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging src/tools/miri/src/machine.rs
Auto-merging src/tools/clippy/clippy_utils/src/ty.rs
CONFLICT (content): Merge conflict in src/tools/clippy/clippy_utils/src/ty.rs
Auto-merging src/tools/clippy/clippy_utils/src/sugg.rs
Auto-merging src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs
CONFLICT (content): Merge conflict in src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs
Auto-merging src/tools/clippy/clippy_utils/src/lib.rs
Auto-merging src/tools/clippy/clippy_utils/src/eager_or_lazy.rs
Auto-merging src/tools/clippy/clippy_utils/src/consts.rs
CONFLICT (content): Merge conflict in src/tools/clippy/clippy_utils/src/consts.rs
Removing src/tools/clippy/clippy_test_deps/src/lib.rs
Removing src/tools/clippy/clippy_test_deps/Cargo.toml
Auto-merging src/tools/clippy/clippy_lints/src/vec.rs
Auto-merging src/tools/clippy/clippy_lints/src/utils/internal_lints/msrv_attr_impl.rs
CONFLICT (content): Merge conflict in src/tools/clippy/clippy_lints/src/utils/internal_lints/msrv_attr_impl.rs
Auto-merging src/tools/clippy/clippy_lints/src/useless_conversion.rs
Auto-merging src/tools/clippy/clippy_lints/src/use_self.rs
Auto-merging src/tools/clippy/clippy_lints/src/transmute/transmute_undefined_repr.rs
CONFLICT (content): Merge conflict in src/tools/clippy/clippy_lints/src/transmute/transmute_undefined_repr.rs
Auto-merging src/tools/clippy/clippy_lints/src/size_of_in_element_count.rs
Auto-merging src/tools/clippy/clippy_lints/src/significant_drop_tightening.rs
CONFLICT (content): Merge conflict in src/tools/clippy/clippy_lints/src/significant_drop_tightening.rs
Auto-merging src/tools/clippy/clippy_lints/src/returns.rs
CONFLICT (content): Merge conflict in src/tools/clippy/clippy_lints/src/returns.rs
Auto-merging src/tools/clippy/clippy_lints/src/redundant_slicing.rs
CONFLICT (content): Merge conflict in src/tools/clippy/clippy_lints/src/redundant_slicing.rs
Auto-merging src/tools/clippy/clippy_lints/src/ptr.rs
Auto-merging src/tools/clippy/clippy_lints/src/pass_by_ref_or_value.rs
Auto-merging src/tools/clippy/clippy_lints/src/non_send_fields_in_send_ty.rs
CONFLICT (content): Merge conflict in src/tools/clippy/clippy_lints/src/non_send_fields_in_send_ty.rs
Auto-merging src/tools/clippy/clippy_lints/src/non_copy_const.rs
CONFLICT (content): Merge conflict in src/tools/clippy/clippy_lints/src/non_copy_const.rs
Auto-merging src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs
Auto-merging src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs
Auto-merging src/tools/clippy/clippy_lints/src/methods/unnecessary_sort_by.rs
CONFLICT (content): Merge conflict in src/tools/clippy/clippy_lints/src/methods/unnecessary_sort_by.rs
Auto-merging src/tools/clippy/clippy_lints/src/methods/needless_collect.rs
Auto-merging src/tools/clippy/clippy_lints/src/methods/mut_mutex_lock.rs
Auto-merging src/tools/clippy/clippy_lints/src/methods/mod.rs
Auto-merging src/tools/clippy/clippy_lints/src/methods/map_flatten.rs
Auto-merging src/tools/clippy/clippy_lints/src/methods/map_collect_result_unit.rs
Auto-merging src/tools/clippy/clippy_lints/src/methods/flat_map_option.rs
Auto-merging src/tools/clippy/clippy_lints/src/methods/expect_fun_call.rs
Auto-merging src/tools/clippy/clippy_lints/src/methods/err_expect.rs
Auto-merging src/tools/clippy/clippy_lints/src/methods/case_sensitive_file_extension_comparisons.rs
Auto-merging src/tools/clippy/clippy_lints/src/matches/redundant_pattern_match.rs
CONFLICT (content): Merge conflict in src/tools/clippy/clippy_lints/src/matches/redundant_pattern_match.rs
Auto-merging src/tools/clippy/clippy_lints/src/matches/match_as_ref.rs
Auto-merging src/tools/clippy/clippy_lints/src/map_unit_fn.rs
Auto-merging src/tools/clippy/clippy_lints/src/loops/missing_spin_loop.rs
Auto-merging src/tools/clippy/clippy_lints/src/let_underscore.rs
Auto-merging src/tools/clippy/clippy_lints/src/len_zero.rs
Auto-merging src/tools/clippy/clippy_lints/src/large_enum_variant.rs
Auto-merging src/tools/clippy/clippy_lints/src/iter_not_returning_iterator.rs
Auto-merging src/tools/clippy/clippy_lints/src/inherent_impl.rs
Auto-merging src/tools/clippy/clippy_lints/src/functions/must_use.rs
Auto-merging src/tools/clippy/clippy_lints/src/from_over_into.rs
Auto-merging src/tools/clippy/clippy_lints/src/derive.rs
CONFLICT (content): Merge conflict in src/tools/clippy/clippy_lints/src/derive.rs
Auto-merging src/tools/clippy/clippy_lints/src/derivable_impls.rs
Auto-merging src/tools/clippy/clippy_lints/src/dereference.rs
CONFLICT (content): Merge conflict in src/tools/clippy/clippy_lints/src/dereference.rs
Auto-merging src/tools/clippy/clippy_lints/src/default_numeric_fallback.rs
Auto-merging src/tools/clippy/clippy_lints/src/casts/as_ptr_cast_mut.rs
Auto-merging src/tools/clippy/clippy_lints/src/bool_assert_comparison.rs
CONFLICT (content): Merge conflict in src/tools/clippy/clippy_lints/src/bool_assert_comparison.rs
Auto-merging compiler/rustc_trait_selection/src/solve/eval_ctxt/select.rs
CONFLICT (content): Merge conflict in compiler/rustc_trait_selection/src/solve/eval_ctxt/select.rs
Auto-merging compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs
Auto-merging compiler/rustc_hir_typeck/src/demand.rs
Auto-merging compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
Automatic merge failed; fix conflicts and then commit the result.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 14, 2023
@bors
Copy link
Contributor

bors commented Jul 14, 2023

☔ The latest upstream changes (presumably #113591) made this pull request unmergeable. Please resolve the merge conflicts.

@matthiaskrgr matthiaskrgr deleted the rollup-af26qss branch March 16, 2024 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues about the rust-lang/rust repository. A-rustdoc-json Area: Rustdoc JSON backend rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.