1
Fork 0

Take an AllocId in intern_const_alloc_for_constprop.

This commit is contained in:
Camille GILLOT 2023-10-12 16:17:06 +00:00
parent e3538d11f1
commit f08dc9be17
2 changed files with 3 additions and 9 deletions

View file

@ -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.