about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/at_exit_imp.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstd/rt/at_exit_imp.rs b/src/libstd/rt/at_exit_imp.rs
index 4be9c8a84ac..67b8b40b47e 100644
--- a/src/libstd/rt/at_exit_imp.rs
+++ b/src/libstd/rt/at_exit_imp.rs
@@ -20,8 +20,9 @@ use option::{Some, None};
 use ptr::RawPtr;
 use unstable::sync::Exclusive;
 use slice::OwnedVector;
+use vec::Vec;
 
-type Queue = Exclusive<~[proc():Send]>;
+type Queue = Exclusive<Vec<proc():Send>>;
 
 // You'll note that these variables are *not* atomic, and this is done on
 // purpose. This module is designed to have init() called *once* in a
@@ -35,7 +36,7 @@ pub fn init() {
     unsafe {
         rtassert!(!RUNNING);
         rtassert!(QUEUE.is_null());
-        let state: ~Queue = ~Exclusive::new(~[]);
+        let state: ~Queue = ~Exclusive::new(vec!());
         QUEUE = cast::transmute(state);
     }
 }
@@ -61,7 +62,7 @@ pub fn run() {
         QUEUE = 0 as *mut Queue;
         let mut vec = None;
         state.with(|arr| {
-            vec = Some(mem::replace(arr, ~[]));
+            vec = Some(mem::replace(arr, vec!()));
         });
         vec.take_unwrap()
     };