Skip to content

Conversation

zachs18
Copy link
Contributor

@zachs18 zachs18 commented Aug 14, 2025

09a3846 from #103693 made LayoutData be owned instead of interned in Variants::Multiple::variants1, so there's no need for TmpLayout in layout_of_enum anymore, and we can just store the variants' layouts directly in the prospective LayoutDatas' variants fields.

This should have no effect on semantics or layout.

(written as part of #145337 but not related to the layout optimizations in that PR)

Footnotes

  1. see line 1154 of compiler/rustc_target/src/abi/mod.rs in the linked commit; Variants::Multiple::variants effectively changed from IndexVec<.., Layout<'tcx>> to IndexVec<.., LayoutData> where the LayoutDatas are not interned as Layouts (LayoutData was at the time called LayoutS)

@rustbot
Copy link
Collaborator

rustbot commented Aug 14, 2025

r? @jackh726

rustbot has assigned @jackh726.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Aug 14, 2025
@cjgillot
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 29, 2025

📌 Commit 12b5794 has been approved by cjgillot

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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 29, 2025
bors added a commit that referenced this pull request Aug 29, 2025
Rollup of 9 pull requests

Successful merges:

 - #143713 (Add a mailmap entry for gnzlbg)
 - #144275 (implement Sum and Product for Saturating(u*))
 - #144354 (fix(std): Fix undefined reference to __my_thread_exit on QNX 8.0)
 - #145387 (Remove TmpLayout in layout_of_enum)
 - #145793 (std library: use execinfo library also on NetBSD.)
 - #145884 (Test `instrument-mcount` codegen)
 - #145947 (Add more to the `[workspace.dependencies]` section in the top-level `Cargo.toml`)
 - #145972 (fix `core::marker::Destruct` doc)
 - #145977 (tests: Ignore basic-stepping.rs on riscv64)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit dd03ce8 into rust-lang:master Aug 29, 2025
10 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 29, 2025
rust-timer added a commit that referenced this pull request Aug 29, 2025
Rollup merge of #145387 - zachs18:remove-tmplayout, r=cjgillot

Remove TmpLayout in layout_of_enum

09a3846 from <#103693> made LayoutData be owned instead of interned in `Variants::Multiple::variants`[^1], so there's no need for `TmpLayout` in layout_of_enum anymore, and we can just store the variants' layouts directly in the prospective `LayoutData`s' `variants` fields.

This should have no effect on semantics or layout.

(written as part of #145337 but not related to the layout optimizations in that PR)

[^1]: see line 1154 of `compiler/rustc_target/src/abi/mod.rs` in the linked commit; `Variants::Multiple::variants` effectively changed from `IndexVec<.., Layout<'tcx>>` to `IndexVec<.., LayoutData>`  where the `LayoutData`s are not interned as `Layout`s (`LayoutData` was at the time called `LayoutS`)
@jieyouxu
Copy link
Member

Already merged.
@bors r-

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 29, 2025
rust-cloud-vms bot pushed a commit to makai410/rustc_public that referenced this pull request Oct 12, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#143713 (Add a mailmap entry for gnzlbg)
 - rust-lang/rust#144275 (implement Sum and Product for Saturating(u*))
 - rust-lang/rust#144354 (fix(std): Fix undefined reference to __my_thread_exit on QNX 8.0)
 - rust-lang/rust#145387 (Remove TmpLayout in layout_of_enum)
 - rust-lang/rust#145793 (std library: use execinfo library also on NetBSD.)
 - rust-lang/rust#145884 (Test `instrument-mcount` codegen)
 - rust-lang/rust#145947 (Add more to the `[workspace.dependencies]` section in the top-level `Cargo.toml`)
 - rust-lang/rust#145972 (fix `core::marker::Destruct` doc)
 - rust-lang/rust#145977 (tests: Ignore basic-stepping.rs on riscv64)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants