diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/comp/middle/trans.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index ee695b88..deff03b4 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -3145,7 +3145,10 @@ fn trans_block_cleanups(@block_ctxt cx, check (_vec.len[cleanup](cleanup_cx.cleanups) == 0u); } - for (cleanup c in cleanup_cx.cleanups) { + auto i = _vec.len[cleanup](cleanup_cx.cleanups); + while (i > 0u) { + i -= 1u; + auto c = cleanup_cx.cleanups.(i); alt (c) { case (clean(?cfn)) { bcx = cfn(bcx).bcx; |