Skip to content

[EXPERIMENT] Replace ResumeTy with an unsafe binder ty.#146562

Draft
cjgillot wants to merge 5 commits into
rust-lang:mainfrom
cjgillot:resume-ty
Draft

[EXPERIMENT] Replace ResumeTy with an unsafe binder ty.#146562
cjgillot wants to merge 5 commits into
rust-lang:mainfrom
cjgillot:resume-ty

Conversation

@cjgillot
Copy link
Copy Markdown
Contributor

@cjgillot cjgillot commented Sep 14, 2025

View all comments

This actually is one of use cases unsafe binder types are meant to address. This PR tries to use them as so.

The implementation of unsafe binders is still incomplete, so this PR is mostly for experimentation and not meant to be merged.

r? @compiler-errors

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Sep 14, 2025

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 14, 2025
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Sep 14, 2025

compiler-errors is not on the review rotation at the moment.
They may take a while to respond.

@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Copy Markdown
Contributor

Maybe let's crater this?

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot added a commit that referenced this pull request Sep 15, 2025
[EXPERIMENT] Replace ResumeTy with an unsafe binder ty.
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Sep 15, 2025

💥 Test timed out after 21600s

@oli-obk
Copy link
Copy Markdown
Contributor

oli-obk commented Sep 15, 2025

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot added a commit that referenced this pull request Sep 15, 2025
[EXPERIMENT] Replace ResumeTy with an unsafe binder ty.
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Sep 15, 2025

☀️ Try build successful (CI)
Build commit: 342ed2e (342ed2e8608ee307743c341962b427652cdb06e9, parent: d1ed52b1f5b78bf66127b670af813b84d57aeedb)

@oli-obk
Copy link
Copy Markdown
Contributor

oli-obk commented Sep 15, 2025

@craterbot check

@craterbot
Copy link
Copy Markdown
Collaborator

👌 Experiment pr-146562 created and queued.
🤖 Automatically detected try build 342ed2e
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 15, 2025
@craterbot
Copy link
Copy Markdown
Collaborator

🚧 Experiment pr-146562 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Copy Markdown
Collaborator

🎉 Experiment pr-146562 is completed!
📊 2 regressed and 7 fixed (699587 total)
📊 1491 spurious results on the retry-regessed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-146562/retry-regressed-list.txt

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Sep 17, 2025
@bors
Copy link
Copy Markdown
Collaborator

bors commented Sep 17, 2025

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

@cjgillot
Copy link
Copy Markdown
Contributor Author

@craterbot
Copy link
Copy Markdown
Collaborator

👌 Experiment pr-146562-1 created and queued.
🤖 Automatically detected try build 342ed2e
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 20, 2025
@craterbot
Copy link
Copy Markdown
Collaborator

🚧 Experiment pr-146562-1 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Copy Markdown
Collaborator

🎉 Experiment pr-146562-1 is completed!
📊 0 regressed and 0 fixed (1471 total)
📊 108 spurious results on the retry-regessed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-146562-1/retry-regressed-list.txt

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Sep 21, 2025
@cjgillot cjgillot marked this pull request as draft October 16, 2025 16:44
@rustbot rustbot 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 Oct 16, 2025
@cjgillot cjgillot force-pushed the resume-ty branch 2 times, most recently from f714d7b to 1420629 Compare May 8, 2026 21:58
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job aarch64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Executing "/scripts/stage_2_test_set1.sh"
+ /scripts/stage_2_test_set1.sh
PR_CI_JOB set; skipping tidy
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip compiler --skip src
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://static.rust-lang.org/dist/2026-04-14/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz
---
---- [ui] tests/ui/async-await/async-drop/async-drop-initial.rs stdout ----
Saved the actual run.stdout to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/async-await/async-drop/async-drop-initial/async-drop-initial.run.stdout`
diff of run.stdout:

1 AsyncInt::Dropper::poll: 0
- AsyncInt::Dropper::poll: 1
- AsyncInt::Dropper::poll: 2
- AsyncInt::Dropper::poll: 3
- AsyncInt::Dropper::poll: 4
- AsyncStruct::Dropper::poll: 6
- AsyncInt::Dropper::poll: 7
- AsyncInt::Dropper::poll: 8
- AsyncReference::Dropper::poll: 10
- AsyncInt::Dropper::poll: 11
- AsyncEnum(A)::Dropper::poll: 12
- SyncInt::drop: 12
- AsyncEnum(B)::Dropper::poll: 13
- AsyncInt::Dropper::poll: 13
- SyncInt::drop: 14
- SyncThenAsync::drop: 15
- AsyncInt::Dropper::poll: 16
- SyncInt::drop: 17
- AsyncInt::Dropper::poll: 18
- AsyncInt::Dropper::poll: 19
- AsyncInt::Dropper::poll: 20
- AsyncUnion::Dropper::poll: 21, 21
23 


The actual run.stdout differed from the expected run.stdout
Saved the actual run.stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/async-await/async-drop/async-drop-initial/async-drop-initial.run.stderr`
normalized run.stderr:

thread 'main' ($TID) panicked at $DIR/async-drop-initial.rs:28:5:
assertion `left == right` failed: sizes did not match for async destructor of type [async_drop_initial::AsyncInt; 2]
  left: 112
 right: 104
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants