about summary refs log tree commit diff
path: root/src/libstd/cleanup.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-11-20 14:17:12 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-11-26 08:23:57 -0800
commit1eca34de7dd55719cd83153994e5caf2027f62a2 (patch)
tree14ba2903a9ead6e569d08a33c9ebfc2c6ba07e9e /src/libstd/cleanup.rs
parent6801bc8f552ce740deb60212903ba43de197689c (diff)
downloadrust-1eca34de7dd55719cd83153994e5caf2027f62a2.tar.gz
rust-1eca34de7dd55719cd83153994e5caf2027f62a2.zip
libstd: Remove all non-`proc` uses of `do` from libstd
Diffstat (limited to 'src/libstd/cleanup.rs')
-rw-r--r--src/libstd/cleanup.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/cleanup.rs b/src/libstd/cleanup.rs
index 2f7b27b55e3..7c972ed86b4 100644
--- a/src/libstd/cleanup.rs
+++ b/src/libstd/cleanup.rs
@@ -82,7 +82,7 @@ pub unsafe fn annihilate() {
     //
     // In this pass, nothing gets freed, so it does not matter whether
     // we read the next field before or after the callback.
-    do each_live_alloc(true) |box, uniq| {
+    each_live_alloc(true, |box, uniq| {
         stats.n_total_boxes += 1;
         if uniq {
             stats.n_unique_boxes += 1;
@@ -90,21 +90,21 @@ pub unsafe fn annihilate() {
             (*box).ref_count = managed::RC_IMMORTAL;
         }
         true
-    };
+    });
 
     // Pass 2: Drop all boxes.
     //
     // In this pass, unique-managed boxes may get freed, but not
     // managed boxes, so we must read the `next` field *after* the
     // callback, as the original value may have been freed.
-    do each_live_alloc(false) |box, uniq| {
+    each_live_alloc(false, |box, uniq| {
         if !uniq {
             let tydesc = (*box).type_desc;
             let data = &(*box).data as *();
             ((*tydesc).drop_glue)(data as *i8);
         }
         true
-    };
+    });
 
     // Pass 3: Free all boxes.
     //
@@ -112,7 +112,7 @@ pub unsafe fn annihilate() {
     // unique-managed boxes, though I think that none of those are
     // left), so we must read the `next` field before, since it will
     // not be valid after.
-    do each_live_alloc(true) |box, uniq| {
+    each_live_alloc(true, |box, uniq| {
         if !uniq {
             stats.n_bytes_freed +=
                 (*((*box).type_desc)).size
@@ -120,7 +120,7 @@ pub unsafe fn annihilate() {
             local_free(box as *i8);
         }
         true
-    };
+    });
 
     if debug_mem() {
         // We do logging here w/o allocation.