Ensure we don't accidentally turn non-zsts into zsts
This commit is contained in:
parent
4fbe434c5c
commit
23b0c47024
1 changed files with 1 additions and 0 deletions
|
|
@ -125,6 +125,7 @@ pub(super) fn op_to_const<'tcx>(
|
|||
}
|
||||
Scalar::Raw { data, .. } => {
|
||||
assert_eq!(data, mplace.layout.align.abi.bytes().into());
|
||||
assert!(mplace.layout.is_zst());
|
||||
ConstValue::Scalar(Scalar::zst())
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue