about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-04-01 13:30:51 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-04-01 13:30:51 -0700
commit9bb05fd41403c6fc28b82e8eff35f8791876ac18 (patch)
tree735ecba6abbc1915e7298dae72cbe034b7cf9d88 /src/libstd/rt
parente9bacbaa2c9c88aaecf07ee30f02d08a1999e5c6 (diff)
parent8eed73feb659633ef809e2af3399e53d5de6c6fa (diff)
downloadrust-9bb05fd41403c6fc28b82e8eff35f8791876ac18.tar.gz
rust-9bb05fd41403c6fc28b82e8eff35f8791876ac18.zip
rollup merge of #23939: nikomatsakis/fn-box
Conflicts:
	src/liballoc/boxed.rs
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/at_exit_imp.rs2
-rw-r--r--src/libstd/rt/mod.rs3
2 files changed, 2 insertions, 3 deletions
diff --git a/src/libstd/rt/at_exit_imp.rs b/src/libstd/rt/at_exit_imp.rs
index 9079c0aaffb..beb2870807a 100644
--- a/src/libstd/rt/at_exit_imp.rs
+++ b/src/libstd/rt/at_exit_imp.rs
@@ -64,7 +64,7 @@ pub fn cleanup() {
             if queue as usize != 0 {
                 let queue: Box<Queue> = Box::from_raw(queue);
                 for to_run in *queue {
-                    to_run.invoke(());
+                    to_run();
                 }
             }
         }
diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs
index 696c7960c3e..632d9647212 100644
--- a/src/libstd/rt/mod.rs
+++ b/src/libstd/rt/mod.rs
@@ -21,7 +21,6 @@
 
 use prelude::v1::*;
 use sys;
-use thunk::Thunk;
 use usize;
 
 // Reexport some of our utilities which are expected by other crates.
@@ -153,7 +152,7 @@ fn lang_start(main: *const u8, argc: isize, argv: *const *const u8) -> isize {
 /// that the closure could not be registered, meaning that it is not scheduled
 /// to be rune.
 pub fn at_exit<F: FnOnce() + Send + 'static>(f: F) -> Result<(), ()> {
-    if at_exit_imp::push(Thunk::new(f)) {Ok(())} else {Err(())}
+    if at_exit_imp::push(Box::new(f)) {Ok(())} else {Err(())}
 }
 
 /// One-time runtime cleanup.