rust/tests/ui/repr
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
..
auxiliary
16-bit-repr-c-enum.rs Create a generic AVR target: avr-none 2025-02-19 19:01:51 +01:00
align-with-extern-c-fn.rs
aligned_enum_cast.rs
attr-usage-repr.rs disallow `repr()` on invalid items 2024-12-05 16:44:00 +01:00
attr-usage-repr.stderr disallow `repr()` on invalid items 2024-12-05 16:44:00 +01:00
conflicting-repr-hints.rs Move 100 entries from tests/ui into subdirs 2024-05-20 19:55:59 -07:00
conflicting-repr-hints.stderr bump conflicting_repr_hints lint to be shown in dependencies 2024-08-06 11:17:26 +02:00
explicit-rust-repr-conflicts.rs Ban non-array SIMD 2024-09-09 19:39:43 -07:00
explicit-rust-repr-conflicts.stderr
invalid_repr_list_help.rs Update ui tests 2024-02-29 14:43:43 +01:00
invalid_repr_list_help.stderr Update ui tests 2024-02-29 14:43:43 +01:00
issue-83505-repr-simd.rs warn about broken simd not only on structs but also enums and unions when we didn't opt in to it 2025-01-07 21:36:37 +01:00
issue-83505-repr-simd.stderr warn about broken simd not only on structs but also enums and unions when we didn't opt in to it 2025-01-07 21:36:37 +01:00
malformed-repr-hints.rs
malformed-repr-hints.stderr
repr-align-assign.fixed
repr-align-assign.rs
repr-align-assign.stderr
repr-align.rs Use the `Align` type when parsing alignment attributes 2024-04-01 03:05:55 +01:00
repr-align.stderr Use the `Align` type when parsing alignment attributes 2024-04-01 03:05:55 +01:00
repr-c-dead-variants.aarch64-unknown-linux-gnu.stderr Update ui tests with `LayoutData { uninhabited: ... }` etc 2025-02-20 13:40:41 -06:00
repr-c-dead-variants.armebv7r-none-eabi.stderr Update ui tests with `LayoutData { uninhabited: ... }` etc 2025-02-20 13:40:41 -06:00
repr-c-dead-variants.i686-pc-windows-msvc.stderr Update ui tests with `LayoutData { uninhabited: ... }` etc 2025-02-20 13:40:41 -06:00
repr-c-dead-variants.rs adjust UI tests 2025-01-10 02:22:57 +01:00
repr-c-dead-variants.x86_64-unknown-linux-gnu.stderr Update ui tests with `LayoutData { uninhabited: ... }` etc 2025-02-20 13:40:41 -06:00
repr-c-int-dead-variants.rs adjust UI tests 2025-01-10 02:22:57 +01:00
repr-c-int-dead-variants.stderr Update ui tests with `LayoutData { uninhabited: ... }` etc 2025-02-20 13:40:41 -06:00
repr-disallow-on-variant.rs
repr-disallow-on-variant.stderr
repr-packed-contains-align.rs
repr-packed-contains-align.stderr
repr-transparent-issue-87496.rs
repr-transparent-issue-87496.stderr
repr-transparent-non-exhaustive-transparent-in-prose.rs repr_transparent_external_private_fields: treat `rustc_pub_transparent` types as local 2024-08-24 23:05:54 +03:00
repr-transparent-non-exhaustive.rs
repr-transparent-non-exhaustive.stderr
repr-transparent-other-items.rs
repr-transparent-other-items.stderr
repr-transparent-other-reprs.rs
repr-transparent-other-reprs.stderr
repr-transparent.rs
repr-transparent.stderr
repr.rs
repr.stderr
repr_align_greater_usize.msp430.stderr Error on alignments greater than `isize::MAX` 2024-10-28 13:17:37 +08:00
repr_align_greater_usize.rs Error on alignments greater than `isize::MAX` 2024-10-28 13:17:37 +08:00
repr_c_int_align.rs
transparent-enum-too-many-variants.rs
transparent-enum-too-many-variants.stderr