mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
fix for unions with scalar layout
This commit is contained in:
parent
6e2715074e
commit
98e11b8aed
@ -91,6 +91,10 @@ pub(super) fn sanity_check_layout<'tcx>(
|
|||||||
FieldsShape::Primitive => {
|
FieldsShape::Primitive => {
|
||||||
// Fine.
|
// Fine.
|
||||||
}
|
}
|
||||||
|
FieldsShape::Union(..) => {
|
||||||
|
// FIXME: I guess we could also check something here? Like, look at all fields?
|
||||||
|
return;
|
||||||
|
}
|
||||||
FieldsShape::Arbitrary { .. } => {
|
FieldsShape::Arbitrary { .. } => {
|
||||||
// Should be an enum, the only field is the discriminant.
|
// Should be an enum, the only field is the discriminant.
|
||||||
assert!(
|
assert!(
|
||||||
|
Loading…
Reference in New Issue
Block a user