This commit is contained in:
Ralf Jung
2018-08-25 21:22:06 +02:00
parent 823837922b
commit 1ba6140891
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -4,7 +4,7 @@
use rustc::mir::interpret::{EvalResult, Scalar, ScalarMaybeUndef};
use rustc_mir::interpret::{
PlaceExtra, PlaceTy, EvalContext, OpTy, Value
PlaceTy, EvalContext, OpTy, Value
};
use super::{ScalarExt, FalibleScalarExt, OperatorEvalContextExt};
@@ -293,7 +293,7 @@ fn call_intrinsic(
_ => {
// Do it in memory
let mplace = self.force_allocation(dest)?;
assert_eq!(mplace.extra, PlaceExtra::None);
assert!(mplace.extra.is_none());
self.memory.write_repeat(mplace.ptr, 0, dest.layout.size)?;
}
}
@@ -550,7 +550,7 @@ fn call_intrinsic(
_ => {
// Do it in memory
let mplace = self.force_allocation(dest)?;
assert_eq!(mplace.extra, PlaceExtra::None);
assert!(mplace.extra.is_none());
self.memory.mark_definedness(mplace.ptr.to_ptr()?, dest.layout.size, false)?;
}
}
+1 -1
View File
@@ -315,7 +315,7 @@ fn access_static_mut<'a, 'm>(
) -> EvalResult<'tcx, &'m mut Allocation> {
// Make a copy, use that.
mem.deep_copy_static(id, MiriMemoryKind::MutStatic.into())?;
mem.get_mut(id) // this is recursive, but now we know that `id` is in `alloc_map`
mem.get_mut(id) // this is recursive, but now we know that `id` is in `alloc_map` now
}
fn box_alloc<'a>(