Stuart Cook dd03ce8cba
Rollup merge of #145387 - zachs18:remove-tmplayout, r=cjgillot
Remove TmpLayout in layout_of_enum

09a3846 from <https://github.com/rust-lang/rust/pull/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 rust-lang/rust#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`)
2025-08-29 12:54:10 +10:00
..