Skip to content

Introduce -Z pack-coroutine-layout flag - #159795

Open
dingxiangfei2009 wants to merge 1 commit into
rust-lang:mainfrom
dingxiangfei2009:coro-layout-flag
Open

Introduce -Z pack-coroutine-layout flag#159795
dingxiangfei2009 wants to merge 1 commit into
rust-lang:mainfrom
dingxiangfei2009:coro-layout-flag

Conversation

@dingxiangfei2009

@dingxiangfei2009 dingxiangfei2009 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

This is still mostly cosmetic, but more stuff is coming over from #135527.

Only the tip of the branch matters, the other commit will be shipped from another PR. It will go away after a rebase, hopefully.

r? @cjgillot

@rustbot

rustbot commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@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. labels Jul 23, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@cjgillot

Copy link
Copy Markdown
Contributor

The second commit is not what I'd describe as cosmetic. It contains quite a lot of behaviour changes that should stay in the main PR.

@rust-bors

This comment has been minimized.

@rustbot

rustbot commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@dingxiangfei2009

Copy link
Copy Markdown
Contributor Author

Sorry for the late reply.

I wasn't completely splitting this commit in a proper way. This time it should stay very cosmetic.

@dingxiangfei2009 dingxiangfei2009 changed the title Introduce -Z coroutine-layout flag Introduce -Z pack-coroutine-layout flag Sep 8, 2026
@rust-log-analyzer

This comment has been minimized.

We will now give users two options, to go with the traditional coroutine
layout as of Dec 2025 or the new proposed compact layout.

The compact layout will be documented in the RelocateUpvar MIR pass
later.

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>

Signed-off-by: Xiangfei Ding <dingxiangfei2009@protonmail.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants