about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2015-02-18 23:50:21 +1100
committerHuon Wilson <dbau.pp+github@gmail.com>2015-02-18 23:50:21 +1100
commitdfc5c0f1e8799f47f9033bdcc8a7cd8a217620a5 (patch)
treee9c32f2e58b3462a23dd9c472d2f236640b78811 /src/libstd/rt
parent6c065fc8cb036785f61ff03e05c1563cbb2dd081 (diff)
parent47f91a9484eceef10536d4caac6ef578cd254567 (diff)
downloadrust-dfc5c0f1e8799f47f9033bdcc8a7cd8a217620a5.tar.gz
rust-dfc5c0f1e8799f47f9033bdcc8a7cd8a217620a5.zip
Manual merge of #22475 - alexcrichton:rollup, r=alexcrichton
 One windows bot failed spuriously.
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/at_exit_imp.rs4
-rw-r--r--src/libstd/rt/mod.rs2
-rw-r--r--src/libstd/rt/unwind.rs4
-rw-r--r--src/libstd/rt/util.rs4
4 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/rt/at_exit_imp.rs b/src/libstd/rt/at_exit_imp.rs
index 3f15cf71ec3..72486fc55d4 100644
--- a/src/libstd/rt/at_exit_imp.rs
+++ b/src/libstd/rt/at_exit_imp.rs
@@ -20,7 +20,7 @@ use mem;
 use thunk::Thunk;
 use sys_common::mutex::{Mutex, MUTEX_INIT};
 
-type Queue = Vec<Thunk>;
+type Queue = Vec<Thunk<'static>>;
 
 // 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
@@ -65,7 +65,7 @@ pub fn cleanup() {
     }
 }
 
-pub fn push(f: Thunk) {
+pub fn push(f: Thunk<'static>) {
     unsafe {
         LOCK.lock();
         init();
diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs
index 00088d6d99a..42cca73e5e2 100644
--- a/src/libstd/rt/mod.rs
+++ b/src/libstd/rt/mod.rs
@@ -148,7 +148,7 @@ fn lang_start(main: *const u8, argc: int, argv: *const *const u8) -> int {
 ///
 /// It is forbidden for procedures to register more `at_exit` handlers when they
 /// are running, and doing so will lead to a process abort.
-pub fn at_exit<F:FnOnce()+Send>(f: F) {
+pub fn at_exit<F:FnOnce()+Send+'static>(f: F) {
     at_exit_imp::push(Thunk::new(f));
 }
 
diff --git a/src/libstd/rt/unwind.rs b/src/libstd/rt/unwind.rs
index c9bbea27e4a..1f5eb3af695 100644
--- a/src/libstd/rt/unwind.rs
+++ b/src/libstd/rt/unwind.rs
@@ -74,7 +74,7 @@ use rt::libunwind as uw;
 
 struct Exception {
     uwe: uw::_Unwind_Exception,
-    cause: Option<Box<Any + Send>>,
+    cause: Option<Box<Any + Send + 'static>>,
 }
 
 pub type Callback = fn(msg: &(Any + Send), file: &'static str, line: uint);
@@ -161,7 +161,7 @@ pub fn panicking() -> bool {
 #[inline(never)]
 #[no_mangle]
 #[allow(private_no_mangle_fns)]
-fn rust_panic(cause: Box<Any + Send>) -> ! {
+fn rust_panic(cause: Box<Any + Send + 'static>) -> ! {
     rtdebug!("begin_unwind()");
 
     unsafe {
diff --git a/src/libstd/rt/util.rs b/src/libstd/rt/util.rs
index d445c299028..a304f1f844d 100644
--- a/src/libstd/rt/util.rs
+++ b/src/libstd/rt/util.rs
@@ -149,7 +149,7 @@ pub fn abort(args: fmt::Arguments) -> ! {
 }
 
 pub unsafe fn report_overflow() {
-    use thread::Thread;
+    use thread;
 
     // See the message below for why this is not emitted to the
     // ^ Where did the message below go?
@@ -159,5 +159,5 @@ pub unsafe fn report_overflow() {
     // and the FFI call needs 2MB of stack when we just ran out.
 
     rterrln!("\nthread '{}' has overflowed its stack",
-             Thread::current().name().unwrap_or("<unknown>"));
+             thread::current().name().unwrap_or("<unknown>"));
 }