about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/util.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-12-22 21:41:02 -0500
committerGitHub <noreply@github.com>2023-12-22 21:41:02 -0500
commitaaff4153229c7d34dcb4eeafb9395169b8768ef3 (patch)
treeb59c2c5169f072a31cac6d0ba6b3f69fb9985193 /compiler/rustc_interface/src/util.rs
parent495203bf61efabecc2c460be38e1eb0f9952601b (diff)
parent8facfb23c6f6c8f338b80d21b0f01223684f0e44 (diff)
downloadrust-aaff4153229c7d34dcb4eeafb9395169b8768ef3.tar.gz
rust-aaff4153229c7d34dcb4eeafb9395169b8768ef3.zip
Rollup merge of #119012 - workingjubilee:extract-enum-layout-fn, r=b-naber
Extract `layout_of_{struct,enum}` fn

While writing #118974 I noticed it was annoying to navigate a huge, several hundred line function, which handles many subcases, and make confident declarations about what part of the flow of execution the compiler would be in. To help with that, this breaks out `layout_of_struct_or_enum`'s fundamental logic into a pair of functions, one for each case. It changes essentially none of that logic, merely moves it around.

Because "the layout of an ADT" feels like a somewhat nebulous subject, I chose to deliberately avoid any expansions to LayoutCalculator's public API, though such does feel like a possible logical next step. There are, indeed, many logical next steps. I'm not taking any of them here, yet, because this comparatively tiny refactor is a prerequisite for all of them.
Diffstat (limited to 'compiler/rustc_interface/src/util.rs')
0 files changed, 0 insertions, 0 deletions