Skip to content

Rollup of 9 pull requests #139979

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

Merged
merged 23 commits into from
Apr 17, 2025
Merged

Rollup of 9 pull requests #139979

merged 23 commits into from
Apr 17, 2025

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Shourya742 and others added 23 commits April 16, 2025 21:53
* [Fix a race with deadlock detection](rust-lang/rustc-rayon#15)
* [Cherry-pick changes from upstream rayon-core](rust-lang/rustc-rayon#16)
  - This also removes a few dependencies from rustc's tidy list.
`FlowSensitiveAnalysis` is only instantiated with the first two
lifetimes being the same.
when compiling target LLVM with `opt-dist local` on Windows/MinGW,
profraw files are being compressed with zlib, so compiling without it
will make `llvm-profdata` complain about lacking of zlib support. this
error is shown:

`profile uses zlib compression but the profile reader was built without
zlib support`

example from llvm test suite: https://github.com/llvm/llvm-project/blob/76b5fcbf975547251faaeed8b567ea09d139a607/llvm/test/tools/llvm-profdata/nocompress.test#L15
when using `opt-dist local` user probably won't need to run tests (for
various reasons). currently the only way to disable them is to set
`TRY_DIST_BUILD=1`, which is not obvious and can be bad for non-CI
envronments (as I guess)
…r=lcnr

Fix replacing supertrait aliases in `ReplaceProjectionWith`

The new solver has a procedure called `predicates_for_object_candidate`, which elaborates the super-bounds and item-bounds that are required to hold for a dyn trait to implement something via a built-in object impl.

In that procedure, there is a folder called `ReplaceProjectionWith` which is responsible for replacing projections that reference `Self`, so that we don't encounter cycles when we then go on to normalize those projections in the process of proving these super-bounds.

That folder had a few problems: Firstly, it wasn't actually checking that this was a super bound originating from `Self`. Secondly, it only accounted for a *single* projection type def id, but trait objects can have multiple (i.e. `trait Foo<A, B>: Bar<A, Assoc = A> + Bar<B, Assoc = B>`).

To fix the first, it's simple enough to just add an equality check for the self ty. To fix the second, I implemented a matching step that's very similar to the `projection_may_match` check we have for upcasting, since on top of having multiple choices, we need to deal with both non-structural matches and ambiguity.

This probably lacks a bit of documentation, but I think it works pretty well.

Fixes rust-lang/trait-system-refactor-initiative#171

r? lcnr
Hide unstable print kinds within emit_unknown_print_request_help in stable channel

Fixes rust-lang#138698

We need to get the channel from `matches`. However, since `matches`(Line 1169) is constructed after `rustc_optgroups` (Line1165, where `RustcOptGroup::value_hint` is generated, i.e. what `rustc --print print` prints), I've left it unchanged here for now.

https://github.com/rust-lang/rust/blob/2da29dbe8fe23df1c7c4ab1d8740ca3c32b15526/compiler/rustc_driver_impl/src/lib.rs#L1161-L1169

There is actually a way to manually parse the `--crate-name` parameter, but I'm afraid that's an unorthodox practice. So I conservatively just modified `emit_unknown_print_request_help` to print different parameters depending on whether they are nightly or not when passing the error parameter.

r? ```@jieyouxu```
…to-remove_and_create_dir_all, r=jieyouxu

add retries to remove and create dir all

closes: rust-lang#139230

r? ```@jieyouxu```
…oli-obk

do not emit `OpaqueCast` projections with `-Znext-solver`

We normalize opaque types in their defining scope if the new solver is enabled. This means projections do not contain any 'revealable' opaque types we need to worry about. We either have a type which has been normalized by writeback or we need to normalize it anyways.

r? ```@compiler-errors``` ```@oli-obk```
bootstrap: enable zlib for LLVM for Windows GNU

when compiling target LLVM with `opt-dist local` on Windows/MinGW, profraw files are being compressed with zlib, so compiling without it will make `llvm-profdata` complain about lacking of zlib support. this error is shown:

`profile uses zlib compression but the profile reader was built without zlib support`

example from llvm test suite: https://github.com/llvm/llvm-project/blob/76b5fcbf975547251faaeed8b567ea09d139a607/llvm/test/tools/llvm-profdata/nocompress.test#L15.

implementation of step 3. from https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/experiment.20with.20.60opt-dist.20local.60.20in.20MSYS2/near/512393873

r? Kobzol
Upgrade to `rustc-rayon-core` 0.5.1

* [Fix a race with deadlock detection](rust-lang/rustc-rayon#15)
* [Cherry-pick changes from upstream rayon-core](rust-lang/rustc-rayon#16)
  - This also removes a few dependencies from rustc's tidy list.
…, r=GuillaumeGomez

rustdoc: Support inlined cross-crate re-exported trait aliases

Previously we'd just drop them. As a result of this PR, [`core::ptr::Thin`](https://doc.rust-lang.org/nightly/core/ptr/traitalias.Thin.html) will be admitted into the `std` façade!

Also, render the where clause *after* the bounds / the `=`, not before them, as it should be.

r? rustdoc
…leanups, r=oli-obk

Two `rustc_const_eval` cleanups

r? ``@lcnr``
opt-dist: add a flag for running tests

when using `opt-dist local` user probably won't need to run tests (for various reasons). currently the only way to disable them is to set `TRY_DIST_BUILD=1`, which is not obvious and can be bad for non-CI envronments (as I guess)

possibly the `run_tests` name can be confusing too...

r? Kobzol

try-job: dist-x86_64-linux
try-job: dist-x86_64-msvc
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool 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. labels Apr 17, 2025
@rustbot rustbot added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Apr 17, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Apr 17, 2025

📌 Commit 6922524 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 Apr 17, 2025
@bors
Copy link
Collaborator

bors commented Apr 17, 2025

⌛ Testing commit 6922524 with merge a15cce2...

@bors
Copy link
Collaborator

bors commented Apr 17, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing a15cce2 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 17, 2025
@bors bors merged commit a15cce2 into rust-lang:master Apr 17, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 17, 2025
Copy link

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 883f9f7 (parent) -> a15cce2 (this PR)

Test differences

Show 35 test diffs

Stage 1

  • [run-make] tests/run-make/print-request-help-stable-unstable: [missing] -> pass (J0)
  • [rustdoc] tests/rustdoc/trait-alias-mention.rs: pass -> [missing] (J0)
  • [rustdoc] tests/rustdoc/trait-aliases.rs: [missing] -> pass (J0)
  • [rustdoc] tests/rustdoc/trait_alias.rs: pass -> [missing] (J0)
  • [ui] tests/ui/traits/next-solver/supertrait-alias-1.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/next-solver/supertrait-alias-2.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/next-solver/supertrait-alias-3.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/next-solver/supertrait-alias-4.rs: [missing] -> pass (J0)
  • [ui] tests/ui/type-alias-impl-trait/destructure_tait-ice-113594.rs: pass -> [missing] (J0)
  • [ui] tests/ui/type-alias-impl-trait/destructure_tait-ice-113594.rs#current: [missing] -> pass (J0)
  • [ui] tests/ui/type-alias-impl-trait/destructure_tait-ice-113594.rs#next: [missing] -> pass (J0)
  • [ui] tests/ui/type-alias-impl-trait/tait-normalize.rs: pass -> [missing] (J0)
  • [ui] tests/ui/type-alias-impl-trait/tait-normalize.rs#current: [missing] -> pass (J0)
  • [ui] tests/ui/type-alias-impl-trait/tait-normalize.rs#next: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/traits/next-solver/supertrait-alias-1.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/supertrait-alias-2.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/supertrait-alias-3.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/supertrait-alias-4.rs: [missing] -> pass (J1)
  • [ui] tests/ui/type-alias-impl-trait/destructure_tait-ice-113594.rs: pass -> [missing] (J1)
  • [ui] tests/ui/type-alias-impl-trait/destructure_tait-ice-113594.rs#current: [missing] -> pass (J1)
  • [ui] tests/ui/type-alias-impl-trait/destructure_tait-ice-113594.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/type-alias-impl-trait/tait-normalize.rs: pass -> [missing] (J1)
  • [ui] tests/ui/type-alias-impl-trait/tait-normalize.rs#current: [missing] -> pass (J1)
  • [ui] tests/ui/type-alias-impl-trait/tait-normalize.rs#next: [missing] -> pass (J1)
  • [rustdoc] tests/rustdoc/trait-alias-mention.rs: pass -> [missing] (J2)
  • [rustdoc] tests/rustdoc/trait-aliases.rs: [missing] -> pass (J2)
  • [rustdoc] tests/rustdoc/trait_alias.rs: pass -> [missing] (J2)
  • [run-make] tests/run-make/print-request-help-stable-unstable: [missing] -> pass (J3)
  • [run-make] tests/run-make/compressed-debuginfo-zstd: pass -> ignore (ignored if LLVM wasn't build with zstd for ELF section compression (we want LLVM/LLD to be built with zstd support)) (J4)

Additionally, 6 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Job duration changes

  1. x86_64-rust-for-linux: 2674.9s -> 4139.5s (54.8%)
  2. mingw-check: 1241.2s -> 1829.3s (47.4%)
  3. x86_64-apple-1: 7482.2s -> 10814.5s (44.5%)
  4. test-various: 4162.8s -> 5817.3s (39.7%)
  5. armhf-gnu: 4490.0s -> 6169.1s (37.4%)
  6. x86_64-gnu: 6369.7s -> 8702.1s (36.6%)
  7. x86_64-gnu-nopt: 5521.0s -> 7268.2s (31.6%)
  8. x86_64-gnu-tools: 5924.2s -> 7717.6s (30.3%)
  9. x86_64-gnu-stable: 6622.8s -> 8540.4s (29.0%)
  10. arm-android: 5504.7s -> 7033.5s (27.8%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#139774 Fix replacing supertrait aliases in ReplaceProjectionWith fc1da58f203bd4ccc1a7d2671b8dcad5ba3d0c1e (link)
#139850 Hide unstable print kinds within emit_unknown_print_request… afc11e01d7c2f7e0a02e7c8e12dba2fdcf5ef412 (link)
#139870 add retries to remove and create dir all b3e49fd45120b486273d1682ade18609cfdec342 (link)
#139902 do not emit OpaqueCast projections with -Znext-solver fdcabfcb8c453a7f2c2373e0a3c9dfd2cd7c3710 (link)
#139931 bootstrap: enable zlib for LLVM for Windows GNU 609ef5bd88e985fe9e531315fac6444467980ddd (link)
#139935 Upgrade to rustc-rayon-core 0.5.1 ed93875b515fb58bf7bbd09a02221fa2d0d7c918 (link)
#139943 rustdoc: Support inlined cross-crate re-exported trait alia… 39dd31d6332b1d605fbea99ef945178da00bd484 (link)
#139961 Two rustc_const_eval cleanups 9fc6eef5b86b82fe62c0c0f4d232e83bc9da7e4a (link)
#139962 opt-dist: add a flag for running tests dd35e85dbd0117898aafc9be4219307850b3c44f (link)

previous master: 883f9f72e8

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a15cce2): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary 0.7%, secondary 3.3%)

This 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.

mean range count
Regressions ❌
(primary)
2.0% [0.4%, 14.2%] 12
Regressions ❌
(secondary)
3.3% [3.3%, 3.3%] 1
Improvements ✅
(primary)
-3.1% [-5.7%, -0.5%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.7% [-5.7%, 14.2%] 16

Cycles

Results (primary -0.1%, secondary -4.2%)

This 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.

mean range count
Regressions ❌
(primary)
0.5% [0.5%, 0.5%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.8% [-0.9%, -0.6%] 2
Improvements ✅
(secondary)
-4.2% [-4.2%, -4.2%] 1
All ❌✅ (primary) -0.1% [-0.9%, 0.5%] 4

Binary size

Results (primary 0.0%, secondary -0.0%)

This 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.

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.1%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.0% [-0.0%, -0.0%] 2
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 6
All ❌✅ (primary) 0.0% [-0.0%, 0.1%] 4

Bootstrap: 775.5s -> 775.923s (0.05%)
Artifact size: 365.03 MiB -> 364.98 MiB (-0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.