error: layout_of(Aligned1) = Layout { size: Size(8 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: $PREF_ALIGN, }, abi: Aggregate { sized: true, }, fields: Arbitrary { offsets: [ Size(0 bytes), ], memory_index: [ 0, ], }, largest_niche: Some( Niche { offset: Size(0 bytes), value: Int( I8, false, ), valid_range: 0..=1, }, ), variants: Multiple { tag: Initialized { value: Int( I8, false, ), valid_range: 0..=1, }, tag_encoding: Direct, tag_field: 0, variants: [ Layout { size: Size(8 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: $PREF_ALIGN, }, abi: Aggregate { sized: true, }, fields: Arbitrary { offsets: [], memory_index: [], }, largest_niche: None, variants: Single { index: 0, }, }, Layout { size: Size(8 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: $PREF_ALIGN, }, abi: Aggregate { sized: true, }, fields: Arbitrary { offsets: [], memory_index: [], }, largest_niche: None, variants: Single { index: 1, }, }, ], }, } --> $DIR/issue-96185-overaligned-enum.rs:8:1 | LL | pub enum Aligned1 { | ^^^^^^^^^^^^^^^^^ error: layout_of(Aligned2) = Layout { size: Size(1 bytes), align: AbiAndPrefAlign { abi: Align(1 bytes), pref: $PREF_ALIGN, }, abi: Scalar( Initialized { value: Int( I8, false, ), valid_range: 0..=1, }, ), fields: Arbitrary { offsets: [ Size(0 bytes), ], memory_index: [ 0, ], }, largest_niche: Some( Niche { offset: Size(0 bytes), value: Int( I8, false, ), valid_range: 0..=1, }, ), variants: Multiple { tag: Initialized { value: Int( I8, false, ), valid_range: 0..=1, }, tag_encoding: Direct, tag_field: 0, variants: [ Layout { size: Size(1 bytes), align: AbiAndPrefAlign { abi: Align(1 bytes), pref: $PREF_ALIGN, }, abi: Aggregate { sized: true, }, fields: Arbitrary { offsets: [], memory_index: [], }, largest_niche: None, variants: Single { index: 0, }, }, Layout { size: Size(1 bytes), align: AbiAndPrefAlign { abi: Align(1 bytes), pref: $PREF_ALIGN, }, abi: Aggregate { sized: true, }, fields: Arbitrary { offsets: [], memory_index: [], }, largest_niche: None, variants: Single { index: 1, }, }, ], }, } --> $DIR/issue-96185-overaligned-enum.rs:16:1 | LL | pub enum Aligned2 { | ^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors