]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/sys/wasm/thread.rs
Change sys::Thread::new to take the thread entry as Box<dyn FnBox() + 'static>̣
[rust.git] / src / libstd / sys / wasm / thread.rs
index 4ad89c42b92dca0bfa921c1caabd5d2aeb3d5730..3d74ffdc14a596befac7ac8a9a862581267a8929 100644 (file)
@@ -19,7 +19,8 @@
 pub const DEFAULT_MIN_STACK_SIZE: usize = 4096;
 
 impl Thread {
-    pub unsafe fn new<'a>(_stack: usize, _p: Box<dyn FnBox() + 'a>)
+    // unsafe: see thread::Builder::spawn_unchecked for safety requirements
+    pub unsafe fn new(_stack: usize, _p: Box<dyn FnBox()>)
         -> io::Result<Thread>
     {
         unsupported()