about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-11-30 18:06:33 +0100
committerRalf Jung <post@ralfj.de>2024-11-30 18:26:30 +0100
commita36652c274e25802230e5188bceab8a92a3e7346 (patch)
tree14f439cc9310a167692e8c04bccc28fe636aee04 /compiler/rustc_ty_utils/src
parentce95a44db65f7f595812a52df6b2f0bc479bd290 (diff)
downloadrust-a36652c274e25802230e5188bceab8a92a3e7346.tar.gz
rust-a36652c274e25802230e5188bceab8a92a3e7346.zip
report UB when the niche value refers to the untagged variant
Diffstat (limited to 'compiler/rustc_ty_utils/src')
-rw-r--r--compiler/rustc_ty_utils/src/layout.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ty_utils/src/layout.rs b/compiler/rustc_ty_utils/src/layout.rs
index 66134b81b2a..0d656f1b63b 100644
--- a/compiler/rustc_ty_utils/src/layout.rs
+++ b/compiler/rustc_ty_utils/src/layout.rs
@@ -81,7 +81,7 @@ fn layout_of<'tcx>(
         record_layout_for_printing(&cx, layout);
     }
 
-    invariant::partially_check_layout(&cx, &layout);
+    invariant::layout_sanity_check(&cx, &layout);
 
     Ok(layout)
 }