Skip to content

Commit ef49af4

Browse files
saethlinRalfJung
andauthoredNov 23, 2023
Update compiler/rustc_const_eval/src/interpret/memory.rs
Co-authored-by: Ralf Jung <post@ralfj.de>
1 parent 6b21acc commit ef49af4

File tree

1 file changed

+2
-1
lines changed
  • compiler/rustc_const_eval/src/interpret

1 file changed

+2
-1
lines changed
 

‎compiler/rustc_const_eval/src/interpret/memory.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,8 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
505505
/// This function is used by Miri's provenance GC to remove unreachable entries from the dead_alloc_map.
506506
pub fn remove_unreachable_allocs(&mut self, reachable_allocs: &FxHashSet<AllocId>) {
507507
// Unlike all the other GC helpers where we check if an `AllocId` is found in the interpreter or
508-
// is live, here all the IDs in the map are for dead allocations.
508+
// is live, here all the IDs in the map are for dead allocations so we don't
509+
// need to check for liveness.
509510
#[allow(rustc::potential_query_instability)] // Only used from Miri, not queries.
510511
self.memory.dead_alloc_map.retain(|id, _| reachable_allocs.contains(id));
511512
}

0 commit comments

Comments
 (0)