1
Fork 0

more targeted errors when extern types end up in places they should not

This commit is contained in:
Ralf Jung 2023-12-02 22:25:14 +01:00
parent 0908f173fd
commit 5a20bac6b3
3 changed files with 22 additions and 0 deletions

View file

@ -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);