| // See also: repr-c-dead-variants.rs |
| //@ normalize-stderr-test: "pref: Align\([1-8] bytes\)" -> "pref: $$SOME_ALIGN" |
| // A simple uninhabited type. |
| // Compiler must not remove dead variants of `#[repr(C, int)]` ADTs. |
| enum UnivariantU8 { //~ ERROR layout_of |
| // ADTs with variants that have fields must have space allocated for those fields. |
| enum TwoVariantsU8 { //~ ERROR layout_of |
| // Some targets have 4-byte-aligned u64, make it always 8-byte-aligned. |
| // This one is 2 x u64: we reserve space for fields in a dead branch. |
| enum DeadBranchHasOtherFieldU8 { //~ ERROR layout_of |
| Variant1(Void, Align8U64), |