diff options
| author | Ralf Jung <post@ralfj.de> | 2023-12-02 22:25:14 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-12-03 08:11:15 +0100 |
| commit | 5a20bac6b3ff61acc3cd68bed0eb3fa598181f17 (patch) | |
| tree | d2fd3b80c9651b0630d3e6aee00c3d6cdacd2ffb /compiler/rustc_codegen_ssa/src | |
| parent | 0908f173fd884ae90584e0b0bca83cb270c23936 (diff) | |
| download | rust-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.rs | 1 |
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); |
