about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_middle/src/ty/layout_sanity_check.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/ty/layout_sanity_check.rs b/compiler/rustc_middle/src/ty/layout_sanity_check.rs
index 95bc81517da..38dc6533837 100644
--- a/compiler/rustc_middle/src/ty/layout_sanity_check.rs
+++ b/compiler/rustc_middle/src/ty/layout_sanity_check.rs
@@ -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!(