diff options
| author | Takayuki Maeda <takoyaki0316@gmail.com> | 2023-12-04 21:19:44 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-04 21:19:44 +0900 |
| commit | da2fb8109e31fee7e858c6a7c3ce9255a035175c (patch) | |
| tree | a90fb8ba307f2f864a8fe1137b0c47a7396ca5fb /compiler/rustc_codegen_ssa/src/mir | |
| parent | 87625dbf2b233be1105524d418a9628fc71adeef (diff) | |
| parent | 5a20bac6b3ff61acc3cd68bed0eb3fa598181f17 (diff) | |
| download | rust-da2fb8109e31fee7e858c6a7c3ce9255a035175c.tar.gz rust-da2fb8109e31fee7e858c6a7c3ce9255a035175c.zip | |
Rollup merge of #118551 - RalfJung:extern-types-bugs, r=compiler-errors
more targeted errors when extern types end up in places they should not Cc https://github.com/rust-lang/rust/issues/115709 -- this does not fix that bug but it makes the panics less obscure and makes it more clear that this is a deeper issue than just a little codegen oversight. (In https://github.com/rust-lang/rust/pull/116115 we decided we'd stick to causing ICEs here for now, rather than nicer errors. We can't currently show any errors pre-mono and probably we don't want post-mono checks when this gets stabilized anyway.)
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/mir')
| -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); |
