You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add optimisations to the coroutine MIR transform to elide or simplify the generated statemachines.
This will help both async futures and generators.
Note: This has some overlap with this other proposal.
I'm not trying to usurp the issue. I was working on it incidentally at the same time and noticed very late that proposal already existed.
This issue is intended for status updates only.
For general questions or comments, please contact a goal owner or post in the Zulip topic.
Update:
PR for merging identical yields is almost ready. Expect it next week.
MCP is still open. Unclear how to proceed. A decision is needed on whether the flag is desired even when panic-immediate-abort reaches the same optimization.
The open PR got some reactions, including a review from Amanieu who wishes to see things differently. I'm going to reflect on it and come up with a plan to address it. Might mean it'll be in a new PR.
I kicked the MCP again and it received a 'second' which means its FCP has started. Once it's accepted I can make the PR that adds the flag. It'll be unstable and I don't yet know what it takes to stabilize it except waiting for half a year or so.
In the mean time, I've been thinking out the 'single await' optimization. I've jotted down what I think is a workable direction, but it needs more investigation. I don't yet know the relevant parts of the compiler that need touching to implement this.
Activity
tomassedovic commentedon May 5, 2026
This issue is intended for status updates only.
For general questions or comments, please contact the owner(s) directly.
diondokter commentedon Jul 17, 2026
MCP for async-panics flag opened: rust-lang/compiler-team#1016
diondokter commentedon Sep 3, 2026
Update:
PR for merging identical yields is almost ready. Expect it next week.
MCP is still open. Unclear how to proceed. A decision is needed on whether the flag is desired even when panic-immediate-abort reaches the same optimization.
diondokter commentedon Sep 7, 2026
PR posted: rust-lang/rust#162429
diondokter commentedon Oct 1, 2026
Update:
The open PR got some reactions, including a review from Amanieu who wishes to see things differently. I'm going to reflect on it and come up with a plan to address it. Might mean it'll be in a new PR.
I kicked the MCP again and it received a 'second' which means its FCP has started. Once it's accepted I can make the PR that adds the flag. It'll be unstable and I don't yet know what it takes to stabilize it except waiting for half a year or so.
In the mean time, I've been thinking out the 'single await' optimization. I've jotted down what I think is a workable direction, but it needs more investigation. I don't yet know the relevant parts of the compiler that need touching to implement this.
diondokter commentedon Oct 22, 2026
MCP + PR to implement the flag has been merged!
rust-lang/rust#164683