fix for unions with scalar layout

This commit is contained in:
Ralf Jung 2022-08-01 12:07:31 -04:00
parent 6e2715074e
commit 98e11b8aed

View File

@ -91,6 +91,10 @@ pub(super) fn sanity_check_layout<'tcx>(
FieldsShape::Primitive => {
// Fine.
}
FieldsShape::Union(..) => {
// FIXME: I guess we could also check something here? Like, look at all fields?
return;
}
FieldsShape::Arbitrary { .. } => {
// Should be an enum, the only field is the discriminant.
assert!(