rename get_global_alloc to try_get_global_alloc
This commit is contained in:
@@ -369,7 +369,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
|
||||
// we don't deallocate it.
|
||||
let (alloc_id, _, _) = ecx.ptr_get_alloc_id(ptr)?;
|
||||
let is_allocated_in_another_const = matches!(
|
||||
ecx.tcx.get_global_alloc(alloc_id),
|
||||
ecx.tcx.try_get_global_alloc(alloc_id),
|
||||
Some(interpret::GlobalAlloc::Memory(_))
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user