Skip to content

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

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
dingxiangfei2009:coro-layout-flag
Nov 18, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
dingxiangfei2009:coro-layout-flag

Conversation

@dingxiangfei2009

@dingxiangfei2009 dingxiangfei2009 commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

View all comments

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

This comment has been minimized.

@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.

@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@dingxiangfei2009

Copy link
Copy Markdown
Contributor Author

r? tmandry

@rustbot rustbot assigned tmandry and unassigned cjgillot Nov 3, 2026

@tmandry tmandry left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This flag does nothing currently (it's silently ignored), and there are no tests. I think the compiler should at least warn or produce an error if you use it.

View changes since this review

Comment thread compiler/rustc_session/src/config.rs Resolved
@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 Nov 4, 2026
@rustbot

rustbot commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot

rustbot commented Nov 13, 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

@rustbot ready

@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 Nov 13, 2026
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 13, 2026
Comment thread compiler/rustc_middle/src/ty/mod.rs Resolved
@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 Nov 13, 2026
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>
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 13, 2026
@tmandry

tmandry commented Nov 17, 2026

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-bors Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f499038 has been approved by tmandry

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Nov 17, 2026
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 18, 2026
… r=tmandry

Introduce `-Z pack-coroutine-layout` flag

This is still mostly cosmetic, but more stuff is coming over from rust-lang#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
rust-bors Bot pushed a commit that referenced this pull request Nov 18, 2026
Rollup of 16 pull requests

Successful merges:

 - #166037 (reflection: enable tool attributes to be reflectable)
 - #165008 (Support `NonNull` pointers as `asm!` input operands)
 - #165465 (Use `emit_ptr_va_arg` for `va_arg` on M68k)
 - #166042 (Fix out of scope method suggestion)
 - #166090 (bootstrap: rebuild LLD when LLVM changes)
 - #159795 (Introduce `-Z pack-coroutine-layout` flag)
 - #163556 (arm: only f32 and f64 are valid HFA bases)
 - #164665 (Add Reference annotations for inline assembly)
 - #165725 (change target modifier errors to use the diagnostic APIs instead of structs)
 - #165912 (simplify `fluent_value_from_str_list_sep_by_and`)
 - #165982 (compiler: Stop special-casing `report_in_external_macro` in `declare_tool_lint!`)
 - #166006 (Detect method shadowed by another when accessing a field or calling method that isn't found in method chain)
 - #166083 (Record seeds in the appropriate order)
 - #166104 (abi/bad-custom.rs: make test run on all editions)
 - #166124 (platform-support: add amaanq as powerpc64-unknown-linux-gnuelfv2 maintainer)
 - #166127 (Add tests from failed attempt at implementing `hir::Param` move)

Failed merges:

 - #165094 (reflection: doc attributes from adts, fields, and variants)
rust-bors Bot pushed a commit that referenced this pull request Nov 18, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #166037 (reflection: enable tool attributes to be reflectable)
 - #165465 (Use `emit_ptr_va_arg` for `va_arg` on M68k)
 - #166042 (Fix out of scope method suggestion)
 - #166090 (bootstrap: rebuild LLD when LLVM changes)
 - #159795 (Introduce `-Z pack-coroutine-layout` flag)
 - #163556 (arm: only f32 and f64 are valid HFA bases)
 - #164665 (Add Reference annotations for inline assembly)
 - #165725 (change target modifier errors to use the diagnostic APIs instead of structs)
 - #165912 (simplify `fluent_value_from_str_list_sep_by_and`)
 - #165982 (compiler: Stop special-casing `report_in_external_macro` in `declare_tool_lint!`)
 - #166006 (Detect method shadowed by another when accessing a field or calling method that isn't found in method chain)
 - #166083 (Record seeds in the appropriate order)
 - #166104 (abi/bad-custom.rs: make test run on all editions)
 - #166124 (platform-support: add amaanq as powerpc64-unknown-linux-gnuelfv2 maintainer)
 - #166127 (Add tests from failed attempt at implementing `hir::Param` move)

Failed merges:

 - #165094 (reflection: doc attributes from adts, fields, and variants)
@rust-bors
rust-bors Bot merged commit c6a43f6 into rust-lang:main Nov 18, 2026
14 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 18, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 18, 2026
Rollup merge of #159795 - dingxiangfei2009:coro-layout-flag, r=tmandry

Introduce `-Z pack-coroutine-layout` flag

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
yermakoffivan pushed a commit to yermakoffivan/rust-clippy that referenced this pull request Nov 20, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - rust-lang/rust#166037 (reflection: enable tool attributes to be reflectable)
 - rust-lang/rust#165465 (Use `emit_ptr_va_arg` for `va_arg` on M68k)
 - rust-lang/rust#166042 (Fix out of scope method suggestion)
 - rust-lang/rust#166090 (bootstrap: rebuild LLD when LLVM changes)
 - rust-lang/rust#159795 (Introduce `-Z pack-coroutine-layout` flag)
 - rust-lang/rust#163556 (arm: only f32 and f64 are valid HFA bases)
 - rust-lang/rust#164665 (Add Reference annotations for inline assembly)
 - rust-lang/rust#165725 (change target modifier errors to use the diagnostic APIs instead of structs)
 - rust-lang/rust#165912 (simplify `fluent_value_from_str_list_sep_by_and`)
 - rust-lang/rust#165982 (compiler: Stop special-casing `report_in_external_macro` in `declare_tool_lint!`)
 - rust-lang/rust#166006 (Detect method shadowed by another when accessing a field or calling method that isn't found in method chain)
 - rust-lang/rust#166083 (Record seeds in the appropriate order)
 - rust-lang/rust#166104 (abi/bad-custom.rs: make test run on all editions)
 - rust-lang/rust#166124 (platform-support: add amaanq as powerpc64-unknown-linux-gnuelfv2 maintainer)
 - rust-lang/rust#166127 (Add tests from failed attempt at implementing `hir::Param` move)

Failed merges:

 - rust-lang/rust#165094 (reflection: doc attributes from adts, fields, and variants)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants