Skip to content

dont assemble shadowed impl candidates #144732

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 2 commits into from
Aug 3, 2025

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Jul 31, 2025

Fixes rust-lang/trait-system-refactor-initiative#109.

I've originally intended to fix this by supporting lazy reevaluation when rerunning cycles. This ended up being really difficult, see https://github.com/lcnr/search_graph for my notes used while working on this. It is also insufficient for the rayon-hang-2.rs test as we end up with goals which we need to rerun for all combinations of provisional results. While landing such an optimization in the future may still be desirable, it is very difficult and insufficient to fix these hangs. Also see the relevant zulip thread.

I was previously opposed to avoiding assembling shadowed impls as it may prevent future improvements in this area, cc #141226. Going to track this and the reasoning behind it in rust-lang/trait-system-refactor-initiative#226.

r? @BoxyUwU @compiler-errors

@rustbot
Copy link
Collaborator

rustbot commented Jul 31, 2025

BoxyUwU is currently at their maximum review capacity.
They may take a while to respond.

@lcnr lcnr marked this pull request as draft July 31, 2025 12:46
@rustbot rustbot added 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 31, 2025
@rust-log-analyzer

This comment has been minimized.

@lcnr lcnr force-pushed the ignore-shadowed-impls branch from 493e0a8 to b0df1dd Compare July 31, 2025 12:57
@lcnr lcnr marked this pull request as ready for review July 31, 2025 13:11
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 31, 2025
@lcnr
Copy link
Contributor Author

lcnr commented Jul 31, 2025

@bors rollup=never

We've already benchmarked this before, it's a small perf win, no reason to do it again before merging this PR

Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me after squashing

@BoxyUwU BoxyUwU assigned compiler-errors and unassigned BoxyUwU Jul 31, 2025
@lcnr lcnr force-pushed the ignore-shadowed-impls branch from e0c16a8 to 9931a92 Compare July 31, 2025 13:35
@lcnr
Copy link
Contributor Author

lcnr commented Jul 31, 2025

@bors r=compiler-errors

@bors
Copy link
Collaborator

bors commented Jul 31, 2025

📌 Commit 9931a92 has been approved by compiler-errors

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 31, 2025
@lcnr lcnr force-pushed the ignore-shadowed-impls branch from 9931a92 to a78f92b Compare July 31, 2025 13:40
@lcnr
Copy link
Contributor Author

lcnr commented Jul 31, 2025

@bors r=compiler-errors

@bors
Copy link
Collaborator

bors commented Jul 31, 2025

📌 Commit a78f92b has been approved by compiler-errors

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Aug 3, 2025

⌛ Testing commit a78f92b with merge f34ba77...

@bors
Copy link
Collaborator

bors commented Aug 3, 2025

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing f34ba77 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 3, 2025
@bors bors merged commit f34ba77 into rust-lang:master Aug 3, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 3, 2025
Copy link
Contributor

github-actions bot commented Aug 3, 2025

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 7cd9505 (parent) -> f34ba77 (this PR)

Test differences

Show 12 test diffs

Stage 1

  • [ui] tests/ui/traits/next-solver/cycles/rayon-hang-1.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/cycles/rayon-hang-2.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/traits/next-solver/cycles/rayon-hang-1.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/next-solver/cycles/rayon-hang-2.rs: [missing] -> pass (J0)

Additionally, 8 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 f34ba774c78ea32b7c40598b8ad23e75cdac42a6 --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-aarch64-linux: 5634.6s -> 8809.5s (56.3%)
  2. dist-aarch64-apple: 5691.0s -> 6727.0s (18.2%)
  3. pr-check-1: 1446.4s -> 1651.2s (14.2%)
  4. aarch64-gnu-llvm-19-2: 2154.8s -> 2441.8s (13.3%)
  5. aarch64-gnu-debug: 3823.9s -> 4293.3s (12.3%)
  6. x86_64-gnu-llvm-19: 2528.0s -> 2774.2s (9.7%)
  7. pr-check-2: 2456.3s -> 2691.9s (9.6%)
  8. x86_64-rust-for-linux: 2624.7s -> 2875.2s (9.5%)
  9. x86_64-gnu-miri: 4588.6s -> 5013.5s (9.3%)
  10. x86_64-apple-2: 4072.8s -> 4417.6s (8.5%)
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 (f34ba77): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.3% [-2.9%, -0.1%] 7
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -0.4%, secondary -4.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
5.0% [5.0%, 5.0%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.0% [-5.2%, -0.9%] 2
Improvements ✅
(secondary)
-4.0% [-10.5%, -0.9%] 8
All ❌✅ (primary) -0.4% [-5.2%, 5.0%] 3

Cycles

Results (primary 2.7%, secondary -2.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.7% [2.7%, 2.7%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.7% [-3.0%, -2.4%] 3
All ❌✅ (primary) 2.7% [2.7%, 2.7%] 2

Binary size

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

Bootstrap: 468.551s -> 467.629s (-0.20%)
Artifact size: 376.95 MiB -> 376.97 MiB (0.01%)

@lcnr lcnr deleted the ignore-shadowed-impls branch August 4, 2025 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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. 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.

rayon hangs
7 participants