adjustions and cleanup to make Miri build again

This commit is contained in:
Ralf Jung
2021-07-14 22:10:17 +02:00
parent 8932aebfdf
commit f4b61ba509
13 changed files with 134 additions and 201 deletions

View File

@@ -312,7 +312,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
align,
interpret::MemoryKind::Machine(MemoryKind::Heap),
)?;
ecx.write_scalar(Scalar::from_pointer(ptr, &*ecx.tcx), dest)?;
ecx.write_pointer(ptr, dest)?;
}
_ => {
return Err(ConstEvalErrKind::NeedsRfc(format!(

View File

@@ -35,7 +35,7 @@ pub(crate) fn const_caller_location(
if intern_const_alloc_recursive(&mut ecx, InternKind::Constant, &loc_place).is_err() {
bug!("intern_const_alloc_recursive should not error in this case")
}
ConstValue::Scalar(Scalar::from_pointer(loc_place.ptr.into_pointer_or_offset().unwrap(), &tcx))
ConstValue::Scalar(Scalar::from_pointer(loc_place.ptr.into_pointer_or_addr().unwrap(), &tcx))
}
/// Convert an evaluated constant to a type level constant