rustup
This commit is contained in:
parent
823837922b
commit
1ba6140891
2 changed files with 4 additions and 4 deletions
|
|
@ -4,7 +4,7 @@ use rustc::ty;
|
|||
|
||||
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 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for EvalContext<'a, 'mir, 'tcx, super:
|
|||
_ => {
|
||||
// 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 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for EvalContext<'a, 'mir, 'tcx, super:
|
|||
_ => {
|
||||
// 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)?;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ impl<'mir, 'tcx: 'mir> Machine<'mir, 'tcx> for Evaluator<'tcx> {
|
|||
) -> 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>(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue