Skip to content

Remove the witness type from coroutine *args* (without actually removing the type) #144458

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

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Jul 25, 2025

This does as much of #144157 as we can without having to break #143545 and/or introduce some better way of handling higher ranked assumptions.

Namely, it:

  • Stalls coroutines based off of the coroutine type rather than the witness type.
  • Reworks the dtorck constraint hack to not rely on the witness type.
  • Removes the witness type from the args of the coroutine, eagerly creating the type for nested obligations when needed (auto/clone impls).

I'll experiment with actually removing the witness type in a follow-up.

r? lcnr

@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) labels Jul 25, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 25, 2025

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@rust-log-analyzer

This comment has been minimized.

if self.reveal_coroutine_witnesses {
queue_type(self, args.as_coroutine().witness());
ty::Coroutine(def_id, args) => {
if self.exhaustive {
Copy link
Contributor

Choose a reason for hiding this comment

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

please add the FIXME to exhaustive again

@lcnr
Copy link
Contributor

lcnr commented Jul 31, 2025

r=me after nit

@lcnr lcnr 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-review Status: Awaiting review from the assignee but also interested parties. labels Jul 31, 2025
@compiler-errors
Copy link
Member Author

@bors r=lcnr rollup=never

@bors
Copy link
Collaborator

bors commented Jul 31, 2025

📌 Commit e976578 has been approved by lcnr

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 31, 2025
bors added a commit that referenced this pull request Jul 31, 2025
Remove the witness type from coroutine *args* (without actually removing the type)

This does as much of #144157 as we can without having to break #143545 and/or introduce some better way of handling higher ranked assumptions.

Namely, it:
* Stalls coroutines based off of the *coroutine* type rather than the witness type.
* Reworks the dtorck constraint hack to not rely on the witness type.
* Removes the witness type from the args of the coroutine, eagerly creating the type for nested obligations when needed (auto/clone impls).

I'll experiment with actually removing the witness type in a follow-up.

r? lcnr
@bors
Copy link
Collaborator

bors commented Jul 31, 2025

⌛ Testing commit e976578 with merge cdc9f26...

@bors
Copy link
Collaborator

bors commented Aug 1, 2025

💥 Test timed out

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 1, 2025
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@lcnr
Copy link
Contributor

lcnr commented Aug 1, 2025

@bors retry

@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 Aug 1, 2025
@bors
Copy link
Collaborator

bors commented Aug 1, 2025

⌛ Testing commit e976578 with merge 63f6845...

@bors
Copy link
Collaborator

bors commented Aug 2, 2025

☀️ Test successful - checks-actions
Approved by: lcnr
Pushing 63f6845 to master...

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

github-actions bot commented Aug 2, 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 4b55fe1 (parent) -> 63f6845 (this PR)

Test differences

Show 18 test diffs

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

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 63f6845e570305a92eaf855897768617366164d6 --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. x86_64-apple-1: 6309.5s -> 8161.5s (29.4%)
  2. pr-check-2: 2287.1s -> 2791.0s (22.0%)
  3. x86_64-apple-2: 5016.9s -> 6088.8s (21.4%)
  4. dist-aarch64-apple: 8140.6s -> 6451.2s (-20.8%)
  5. x86_64-rust-for-linux: 2523.5s -> 2966.4s (17.5%)
  6. pr-check-1: 1507.7s -> 1760.3s (16.7%)
  7. x86_64-gnu-llvm-19: 2539.5s -> 2929.1s (15.3%)
  8. aarch64-gnu-debug: 3676.2s -> 4217.3s (14.7%)
  9. aarch64-gnu-llvm-19-2: 2254.0s -> 2578.4s (14.4%)
  10. x86_64-gnu-tools: 3314.5s -> 3728.6s (12.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 (63f6845): comparison URL.

Overall result: ❌✅ regressions and improvements - 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

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.0% [0.0%, 0.0%] 1
Improvements ✅
(primary)
-1.5% [-1.5%, -1.5%] 1
Improvements ✅
(secondary)
-0.5% [-1.5%, -0.0%] 5
All ❌✅ (primary) -1.5% [-1.5%, -1.5%] 1

Max RSS (memory usage)

Results (primary 2.2%)

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

mean range count
Regressions ❌
(primary)
2.2% [2.2%, 2.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.2% [2.2%, 2.2%] 1

Cycles

Results (primary 2.8%, secondary 2.9%)

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

mean range count
Regressions ❌
(primary)
2.8% [2.8%, 2.8%] 1
Regressions ❌
(secondary)
2.9% [2.9%, 2.9%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.8% [2.8%, 2.8%] 1

Binary size

Results (primary -0.0%, secondary -0.3%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.0% [-0.0%, -0.0%] 4
Improvements ✅
(secondary)
-0.3% [-0.7%, -0.0%] 13
All ❌✅ (primary) -0.0% [-0.0%, -0.0%] 4

Bootstrap: 467.125s -> 468.385s (0.27%)
Artifact size: 376.83 MiB -> 376.83 MiB (-0.00%)

@rustbot rustbot added the perf-regression Performance regression. label Aug 2, 2025
@bors bors mentioned this pull request Aug 2, 2025
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. perf-regression Performance regression. 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.

6 participants