diff options
| author | Ralf Jung <post@ralfj.de> | 2021-07-14 22:10:17 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2021-07-15 17:14:11 +0200 |
| commit | f4b61ba509e71710df5c14ac282fbdd512344072 (patch) | |
| tree | 6508c060e035d2d3354447eb50a0a84371a6a5a4 /compiler/rustc_mir/src/const_eval | |
| parent | 8932aebfdfc8e4be18ed5213ba24f72954c7ba47 (diff) | |
| download | rust-f4b61ba509e71710df5c14ac282fbdd512344072.tar.gz rust-f4b61ba509e71710df5c14ac282fbdd512344072.zip | |
adjustions and cleanup to make Miri build again
Diffstat (limited to 'compiler/rustc_mir/src/const_eval')
| -rw-r--r-- | compiler/rustc_mir/src/const_eval/machine.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_mir/src/const_eval/mod.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir/src/const_eval/machine.rs b/compiler/rustc_mir/src/const_eval/machine.rs index 2bebbc65c24..c809f4f273a 100644 --- a/compiler/rustc_mir/src/const_eval/machine.rs +++ b/compiler/rustc_mir/src/const_eval/machine.rs @@ -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!( diff --git a/compiler/rustc_mir/src/const_eval/mod.rs b/compiler/rustc_mir/src/const_eval/mod.rs index 78124428787..a334165df4c 100644 --- a/compiler/rustc_mir/src/const_eval/mod.rs +++ b/compiler/rustc_mir/src/const_eval/mod.rs @@ -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 |
