about summary refs log tree commit diff
path: root/src/libstd/sys/common/thread.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/sys/common/thread.rs')
-rw-r--r--src/libstd/sys/common/thread.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/sys/common/thread.rs b/src/libstd/sys/common/thread.rs
index f45daea18a2..1845b6266ed 100644
--- a/src/libstd/sys/common/thread.rs
+++ b/src/libstd/sys/common/thread.rs
@@ -25,6 +25,7 @@ pub fn start_thread(main: *mut libc::c_void) {
     unsafe {
         stack::record_os_managed_stack_bounds(0, usize::MAX);
         let _handler = stack_overflow::Handler::new();
-        Box::from_raw(main as *mut Thunk).invoke(());
+        let main: Box<Thunk> = Box::from_raw(main as *mut Thunk);
+        main();
     }
 }