refine comment explaining the order of checks on deallocate

This commit is contained in:
Ralf Jung 2017-07-05 10:26:15 -07:00
parent 440c4778fa
commit 4165051073

View file

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