Take an AllocId in intern_const_alloc_for_constprop.
This commit is contained in:
parent
e3538d11f1
commit
f08dc9be17
2 changed files with 3 additions and 9 deletions
|
@ -459,10 +459,9 @@ pub fn intern_const_alloc_for_constprop<
|
|||
M: CompileTimeMachine<'mir, 'tcx, T>,
|
||||
>(
|
||||
ecx: &mut InterpCx<'mir, 'tcx, M>,
|
||||
ret: &MPlaceTy<'tcx>,
|
||||
alloc_id: AllocId,
|
||||
) -> InterpResult<'tcx, ()> {
|
||||
// Move allocation to `tcx`.
|
||||
let alloc_id = ret.ptr().provenance.unwrap();
|
||||
let Some((_, mut alloc)) = ecx.memory.alloc_map.remove(&alloc_id) else {
|
||||
// Pointer not found in local memory map. It is either a pointer to the global
|
||||
// map, or dangling.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue