rust/compiler/rustc_codegen_ssa
Jubilee 8c9e3749a1
Rollup merge of #136985 - zachs18:backend-repr-remove-uninhabited, r=workingjubilee
Do not ignore uninhabited types for function-call ABI purposes. (Remove BackendRepr::Uninhabited)

Accepted MCP: https://github.com/rust-lang/compiler-team/issues/832

Fixes #135802

Do not consider the inhabitedness of a type for function call ABI purposes.

* Remove the [`rustc_abi::BackendRepr::Uninhabited`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_abi/enum.BackendRepr.html) variant
  * Instead calculate the `BackendRepr` of uninhabited types "normally" (as though they were not uninhabited "at the top level", but still considering inhabitedness of variants to determine enum layout, etc)
* Add an `uninhabited: bool` field to [`rustc_abi::LayoutData`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_abi/struct.LayoutData.html) so inhabitedness of a `LayoutData` can still be queried when necessary (e.g. when determining if an enum variant needs a tag value allocated to it).

This should not affect type layouts (size/align/field offset); this should only affect function call ABI, and only of uninhabited types.

cc ``@RalfJung``
2025-02-20 14:58:18 -08:00
..
src Rollup merge of #136985 - zachs18:backend-repr-remove-uninhabited, r=workingjubilee 2025-02-20 14:58:18 -08:00
Cargo.toml Move hashes from rustc_data_structure to rustc_hashes so they can be shared with rust-analyzer 2025-02-16 16:18:30 -05:00
README.md mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
messages.ftl Rollup merge of #133429 - EnzymeAD:autodiff-middle, r=oli-obk 2025-01-31 00:26:30 -05:00

README.md

Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.