diff options
| author | Graydon Hoare <[email protected]> | 2011-01-31 12:06:27 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-01-31 12:06:27 -0800 |
| commit | f9b37c73480345c5cb4076cbaf67dc36df689919 (patch) | |
| tree | fa8641c9004892bb8313f73a6a10d8db0f008100 /src/comp | |
| parent | Un-XFAIL some compile-fail tests (diff) | |
| download | rust-f9b37c73480345c5cb4076cbaf67dc36df689919.tar.xz rust-f9b37c73480345c5cb4076cbaf67dc36df689919.zip | |
Run cleanups in reverse order. Not presently observable, no dtors.
Diffstat (limited to 'src/comp')
| -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; |