1
Fork 0

get rid of MemPlaceMeta::Poison

MPlaceTy::dangling still exists, but now it is only called in places that
actually conceptually allocate something new, so that's fine.
This commit is contained in:
Ralf Jung 2022-07-04 11:46:10 -04:00
parent ca4e39400e
commit 874a130ca0
6 changed files with 12 additions and 21 deletions

View file

@ -225,6 +225,8 @@ impl<Tag> Allocation<Tag> {
/// Try to create an Allocation of `size` bytes, failing if there is not enough memory
/// available to the compiler to do so.
///
/// If `panic_on_fail` is true, this will never return `Err`.
pub fn uninit<'tcx>(size: Size, align: Align, panic_on_fail: bool) -> InterpResult<'tcx, Self> {
let bytes = Box::<[u8]>::try_new_zeroed_slice(size.bytes_usize()).map_err(|_| {
// This results in an error that can happen non-deterministically, since the memory