about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-06-10 19:33:04 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-06-17 09:07:17 -0700
commitb4a2823cd6c6f1a560469587f902f3a1f49d3c79 (patch)
tree162e8021fd73ffc7dfe0798dc99097138343977a /src/libstd/rt
parentaa931e9c6f92557b99978f1cc562c99051190f79 (diff)
downloadrust-b4a2823cd6c6f1a560469587f902f3a1f49d3c79.tar.gz
rust-b4a2823cd6c6f1a560469587f902f3a1f49d3c79.zip
More test fixes and fallout of stability changes
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/at_exit_imp.rs11
-rw-r--r--src/libstd/rt/mod.rs4
-rw-r--r--src/libstd/rt/unwind/gcc.rs3
3 files changed, 9 insertions, 9 deletions
diff --git a/src/libstd/rt/at_exit_imp.rs b/src/libstd/rt/at_exit_imp.rs
index 19a17be4ccf..17d2940a6f1 100644
--- a/src/libstd/rt/at_exit_imp.rs
+++ b/src/libstd/rt/at_exit_imp.rs
@@ -16,13 +16,12 @@
 // segfaults (the queue's memory is mysteriously gone), so
 // instead the cleanup is tied to the `std::rt` entry point.
 
-use boxed;
+use alloc::boxed::FnBox;
 use boxed::Box;
-use vec::Vec;
-use thunk::Thunk;
 use sys_common::mutex::Mutex;
+use vec::Vec;
 
-type Queue = Vec<Thunk<'static>>;
+type Queue = Vec<Box<FnBox()>>;
 
 // NB these are specifically not types from `std::sync` as they currently rely
 // on poisoning and this module needs to operate at a lower level than requiring
@@ -40,7 +39,7 @@ const ITERS: usize = 10;
 unsafe fn init() -> bool {
     if QUEUE.is_null() {
         let state: Box<Queue> = box Vec::new();
-        QUEUE = boxed::into_raw(state);
+        QUEUE = Box::into_raw(state);
     } else if QUEUE as usize == 1 {
         // can't re-init after a cleanup
         return false
@@ -71,7 +70,7 @@ pub fn cleanup() {
     }
 }
 
-pub fn push(f: Thunk<'static>) -> bool {
+pub fn push(f: Box<FnBox()>) -> bool {
     let mut ret = true;
     unsafe {
         LOCK.lock();
diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs
index 1b8e81e2b79..1729d20da20 100644
--- a/src/libstd/rt/mod.rs
+++ b/src/libstd/rt/mod.rs
@@ -139,7 +139,9 @@ fn lang_start(main: *const u8, argc: isize, argv: *const *const u8) -> isize {
     if failed {
         rt::DEFAULT_ERROR_CODE
     } else {
-        env::get_exit_status() as isize
+        #[allow(deprecated)]
+        fn exit_status() -> isize { env::get_exit_status() as isize }
+        exit_status()
     }
 }
 
diff --git a/src/libstd/rt/unwind/gcc.rs b/src/libstd/rt/unwind/gcc.rs
index 39b32a3f08e..84c6d6864a9 100644
--- a/src/libstd/rt/unwind/gcc.rs
+++ b/src/libstd/rt/unwind/gcc.rs
@@ -11,7 +11,6 @@
 use prelude::v1::*;
 
 use any::Any;
-use boxed;
 use libc::c_void;
 use rt::libunwind as uw;
 
@@ -29,7 +28,7 @@ pub unsafe fn panic(data: Box<Any + Send + 'static>) -> ! {
         },
         cause: Some(data),
     };
-    let exception_param = boxed::into_raw(exception) as *mut uw::_Unwind_Exception;
+    let exception_param = Box::into_raw(exception) as *mut uw::_Unwind_Exception;
     let error = uw::_Unwind_RaiseException(exception_param);
     rtabort!("Could not unwind stack, error = {}", error as isize);