From 4165051073675814f09f4ef2ab5dbbb901cc10f4 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 5 Jul 2017 10:26:15 -0700 Subject: [PATCH] refine comment explaining the order of checks on deallocate --- src/memory.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/memory.rs b/src/memory.rs index bd38b737a40f..0a032891f06f 100644 --- a/src/memory.rs +++ b/src/memory.rs @@ -276,7 +276,7 @@ impl<'a, 'tcx> Memory<'a, 'tcx> { } { - // Some code somewhere seems to rely on us *not* removing the allocation when we yield this kind of error. + // deallocate_local in eval_context.rs relies on nothing actually having changed when this error occurs. // So we do this test in advance. let alloc = self.get(ptr.alloc_id)?; if alloc.static_kind != StaticKind::NotStatic {