about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-12-02 22:25:14 +0100
committerRalf Jung <post@ralfj.de>2023-12-03 08:11:15 +0100
commit5a20bac6b3ff61acc3cd68bed0eb3fa598181f17 (patch)
treed2fd3b80c9651b0630d3e6aee00c3d6cdacd2ffb /compiler/rustc_codegen_ssa/src
parent0908f173fd884ae90584e0b0bca83cb270c23936 (diff)
downloadrust-5a20bac6b3ff61acc3cd68bed0eb3fa598181f17.tar.gz
rust-5a20bac6b3ff61acc3cd68bed0eb3fa598181f17.zip
more targeted errors when extern types end up in places they should not
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/operand.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/operand.rs b/compiler/rustc_codegen_ssa/src/mir/operand.rs
index 0ab2b7ecd9c..6661f1f81e6 100644
--- a/compiler/rustc_codegen_ssa/src/mir/operand.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/operand.rs
@@ -414,6 +414,7 @@ impl<'a, 'tcx, V: CodegenObject> OperandValue<V> {
                 // value is through `undef`/`poison`, and the store itself is useless.
             }
             OperandValue::Ref(r, None, source_align) => {
+                assert!(dest.layout.is_sized(), "cannot directly store unsized values");
                 if flags.contains(MemFlags::NONTEMPORAL) {
                     // HACK(nox): This is inefficient but there is no nontemporal memcpy.
                     let ty = bx.backend_type(dest.layout);