Skip to content

Rollup of 7 pull requests #141345

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 14 commits into from
May 21, 2025
Merged

Rollup of 7 pull requests #141345

merged 14 commits into from
May 21, 2025

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

dianne and others added 14 commits May 19, 2025 18:02
We resolve guard patterns' guards in `resolve_pattern_inner`, so to
avoid resolving them multiple times, we must avoid doing so earlier. To
accomplish this, `LateResolutionVisitor::visit_pat` contains a case for
guard patterns that avoids visiting their guards while walking patterns.
This fixes an ICE due to `visit::walk_pat` being used instead, which
meant guards at the top level of a pattern would be visited twice.
This is needed to make the cache work after moving CI from the `rust-lang-ci` org to `rust-lang`.
only resolve top-level guard patterns' guards once

We resolve guard patterns' guards in `resolve_pattern_inner`, so to avoid resolving them multiple times, we must avoid doing so earlier. To accomplish this, `LateResolutionVisitor::visit_pat` contains a case for guard patterns that avoids visiting their guards while walking patterns.

This PR fixes rust-lang#141265, which was due to `visit::walk_pat` being used instead; this meant guards at the top level of a pattern would be visited twice. e.g. it would ICE on `for x if x in [] {}`, but not `for (x if x) in [] {}`. `visit_pat` was already used for the guard pattern in the second example, on account of the top-level pattern being parens.
…arcoieni

Use Docker cache from the current repository

This is needed to make the cache work after moving CI from the `rust-lang-ci` org to `rust-lang`. Shouldn't be merged until we actually move bors.

Context: rust-lang/infra-team#188

r? `@marcoieni`
…mir-place-deref-fix, r=oli-obk

Async drop fix for 'broken mir, place has deref as later projection'

fixes rust-lang#140975

Problem in codegen fixed with an additional temporary local.
…-empty-impl-fix, r=oli-obk

When AsyncDrop impl is empty, sync drop generated in elaborator

Fixes rust-lang#140974.
Do not eagerly fold consts in `normalize_param_env_or_error` if new solver

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

Given:

```
trait Trait: Deref<Target = [u8; { 1 + 1 }]> {}
```

when elaborating param env for `Trait`, we have `Self: Trait`, `Self: Deref<Target = [u8; {anon const}]>`.

Before this PR, we would fold the anon consts away *before* elaborating. However, we end up getting another *un-folded* copy of the anon const from elaborating `Self: Trait`. This leads to normalization ambiguity.

r? lcnr
…e-unnorm, r=lcnr

Use `DeepRejectCtxt` in `assemble_inherent_candidates_from_param`

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

We were not properly considering unnormalized param-env candidates in `assemble_inherent_candidates_from_param`.

r? lcnr
…compiler-errors

eagerly check nested obligations when coercing fndefs

fixes rust-lang/trait-system-refactor-initiative#212

r? `@compiler-errors`
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels May 21, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented May 21, 2025

📌 Commit 9fd0ab6 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 May 21, 2025
@bors
Copy link
Collaborator

bors commented May 21, 2025

⌛ Testing commit 9fd0ab6 with merge 462cc09...

@bors
Copy link
Collaborator

bors commented May 21, 2025

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 21, 2025
@bors bors merged commit 462cc09 into rust-lang:master May 21, 2025
7 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 21, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#141267 only resolve top-level guard patterns' guards once a886b081c2f5309d9feed9ab8d39c5b0e5489d3c (link)
#141280 Use Docker cache from the current repository b688f76238521599ede3b4a3377a393cfe07d3d0 (link)
#141296 Async drop fix for 'broken mir, place has deref as later pr… f6bc122073b015ca8577c069471c3d9901bbf246 (link)
#141328 When AsyncDrop impl is empty, sync drop generated in elabor… 5e05b2954326b70d473565559638a1eb59c177f2 (link)
#141332 Do not eagerly fold consts in `normalize_param_env_or_error… 54d8d6a7831c41addc3cbe95126b168555b3ca05 (link)
#141333 Use DeepRejectCtxt in `assemble_inherent_candidates_from_… 179361e6625bbdc6c5e7cf4511a2c7a240036f8f (link)
#141334 eagerly check nested obligations when coercing fndefs 238129b759542369b1171574e80bc95a1a55e459 (link)

previous master: 356f2d0774

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

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 356f2d0 (parent) -> 462cc09 (this PR)

Test differences

Show 60 test diffs

Stage 1

  • [crashes] tests/crashes/140974.rs: pass -> [missing] (J0)
  • [crashes] tests/crashes/140975.rs: pass -> [missing] (J0)
  • [ui] tests/ui/async-await/async-drop/deref-later-projection.rs: [missing] -> pass (J0)
  • [ui] tests/ui/async-await/async-drop/elaborate-index-out-of-bounds.rs: [missing] -> pass (J0)
  • [ui] tests/ui/pattern/rfc-3637-guard-patterns/only-resolve-top-level-guard-expr-once-ice-141265.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs: pass -> [missing] (J0)
  • [ui] tests/ui/traits/next-solver/coerce-depth.rs: pass -> [missing] (J0)
  • [ui] tests/ui/traits/next-solver/coercion/coerce-ambig-alias-to-rigid-alias.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/next-solver/coercion/coerce-depth.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/next-solver/coercion/fn-def-coerce-nested-obligations.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/next-solver/coercion/trait-upcast-lhs-needs-normalization.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/next-solver/coercion/upcast-right-substs.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/next-solver/coercion/upcast-wrong-substs.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/next-solver/method/param-method-from-unnormalized-param-env-2.rs#current: [missing] -> pass (J0)
  • [ui] tests/ui/traits/next-solver/method/param-method-from-unnormalized-param-env-2.rs#next: [missing] -> pass (J0)
  • [ui] tests/ui/traits/next-solver/method/param-method-from-unnormalized-param-env.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/next-solver/no-param-env-const-fold.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/next-solver/non-wf-in-coerce-pointers.rs: pass -> [missing] (J0)
  • [ui] tests/ui/traits/next-solver/trait-upcast-lhs-needs-normalization.rs: pass -> [missing] (J0)
  • [ui] tests/ui/traits/next-solver/upcast-right-substs.rs: pass -> [missing] (J0)
  • [ui] tests/ui/traits/next-solver/upcast-wrong-substs.rs: pass -> [missing] (J0)

Stage 2

  • [ui] tests/ui/async-await/async-drop/deref-later-projection.rs: [missing] -> pass (J1)
  • [ui] tests/ui/async-await/async-drop/elaborate-index-out-of-bounds.rs: [missing] -> pass (J1)
  • [ui] tests/ui/pattern/rfc-3637-guard-patterns/only-resolve-top-level-guard-expr-once-ice-141265.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs: pass -> [missing] (J1)
  • [ui] tests/ui/traits/next-solver/coerce-depth.rs: pass -> [missing] (J1)
  • [ui] tests/ui/traits/next-solver/coercion/coerce-ambig-alias-to-rigid-alias.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/coercion/coerce-depth.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/coercion/fn-def-coerce-nested-obligations.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/coercion/trait-upcast-lhs-needs-normalization.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/coercion/upcast-right-substs.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/coercion/upcast-wrong-substs.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/method/param-method-from-unnormalized-param-env-2.rs#current: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/method/param-method-from-unnormalized-param-env-2.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/method/param-method-from-unnormalized-param-env.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/no-param-env-const-fold.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/non-wf-in-coerce-pointers.rs: pass -> [missing] (J1)
  • [ui] tests/ui/traits/next-solver/trait-upcast-lhs-needs-normalization.rs: pass -> [missing] (J1)
  • [ui] tests/ui/traits/next-solver/upcast-right-substs.rs: pass -> [missing] (J1)
  • [ui] tests/ui/traits/next-solver/upcast-wrong-substs.rs: pass -> [missing] (J1)
  • [crashes] tests/crashes/140974.rs: pass -> [missing] (J2)
  • [crashes] tests/crashes/140975.rs: pass -> [missing] (J2)

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

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 462cc099c93b2915eef61c3fbc504588b41b27d1 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-apple-various: 6122.3s -> 8369.1s (36.7%)
  2. dist-x86_64-illumos: 8163.3s -> 5660.9s (-30.7%)
  3. dist-arm-linux-musl: 8056.5s -> 5819.9s (-27.8%)
  4. dist-x86_64-musl: 9893.0s -> 7394.4s (-25.3%)
  5. dist-x86_64-apple: 7810.3s -> 9629.9s (23.3%)
  6. dist-x86_64-freebsd: 6376.3s -> 4950.0s (-22.4%)
  7. dist-aarch64-apple: 4809.7s -> 5797.7s (20.5%)
  8. dist-powerpc64-linux: 6654.9s -> 5397.0s (-18.9%)
  9. dist-loongarch64-musl: 6572.3s -> 5423.0s (-17.5%)
  10. dist-riscv64-linux: 6255.9s -> 5177.4s (-17.2%)
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

Finished benchmarking commit (462cc09): comparison URL.

Overall result: ❌ regressions - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

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

Max RSS (memory usage)

Results (primary -2.6%, secondary -2.1%)

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
Regressions ❌
(secondary)
1.2% [1.2%, 1.2%] 1
Improvements ✅
(primary)
-2.6% [-3.7%, -1.3%] 4
Improvements ✅
(secondary)
-2.7% [-5.5%, -1.4%] 6
All ❌✅ (primary) -2.6% [-3.7%, -1.3%] 4

Cycles

Results (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
Regressions ❌
(secondary)
2.1% [2.1%, 2.2%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.0%] 2
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 775.51s -> 777.166s (0.21%)
Artifact size: 365.50 MiB -> 365.55 MiB (0.01%)

@rustbot rustbot added the perf-regression Performance regression. label May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. 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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. 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.

9 participants