diff options
| author | Jethro Beekman <jethro@fortanix.com> | 2018-11-30 10:39:12 +0530 |
|---|---|---|
| committer | Jethro Beekman <jethro@fortanix.com> | 2018-12-06 20:37:15 +0530 |
| commit | c559216ad0d2f0737f8dbb51a7d42b1727b77b3c (patch) | |
| tree | 61eff11ff6e504d1f5a23ea975c233a3b447853e /src/libstd/sys/wasm/thread.rs | |
| parent | 6c0364064604d1a3a7755339e7ea81bbea53c005 (diff) | |
| download | rust-c559216ad0d2f0737f8dbb51a7d42b1727b77b3c.tar.gz rust-c559216ad0d2f0737f8dbb51a7d42b1727b77b3c.zip | |
Change sys::Thread::new to take the thread entry as Box<dyn FnBox() + 'static>̣
Diffstat (limited to 'src/libstd/sys/wasm/thread.rs')
| -rw-r--r-- | src/libstd/sys/wasm/thread.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/sys/wasm/thread.rs b/src/libstd/sys/wasm/thread.rs index 4ad89c42b92..3d74ffdc14a 100644 --- a/src/libstd/sys/wasm/thread.rs +++ b/src/libstd/sys/wasm/thread.rs @@ -19,7 +19,8 @@ pub struct Thread(Void); 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() |
