diff options
| author | CrLF0710 <crlf0710@gmail.com> | 2019-04-10 00:46:28 +0800 |
|---|---|---|
| committer | CrLF0710 <crlf0710@gmail.com> | 2019-04-10 09:40:44 +0800 |
| commit | 6635fbed4ca8c65822f99e994735bd1877fb063e (patch) | |
| tree | b025f0af7d69a1aa1713e81fbece7dfad30c1b3a /src/libstd/thread | |
| parent | 3750348daff89741e3153e0e120aa70a45ff5b68 (diff) | |
| download | rust-6635fbed4ca8c65822f99e994735bd1877fb063e.tar.gz rust-6635fbed4ca8c65822f99e994735bd1877fb063e.zip | |
Eliminate `FnBox` usages from libstd.
Diffstat (limited to 'src/libstd/thread')
| -rw-r--r-- | src/libstd/thread/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index cb507971091..c59226e0c0b 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -157,7 +157,6 @@ #![stable(feature = "rust1", since = "1.0.0")] use crate::any::Any; -use crate::boxed::FnBox; use crate::cell::UnsafeCell; use crate::ffi::{CStr, CString}; use crate::fmt; @@ -488,7 +487,9 @@ impl Builder { // returning. native: Some(imp::Thread::new( stack_size, - mem::transmute::<Box<dyn FnBox() + 'a>, Box<dyn FnBox() + 'static>>(Box::new(main)) + mem::transmute::<Box<dyn FnOnce() + 'a>, Box<dyn FnOnce() + 'static>>(Box::new( + main, + )), )?), thread: my_thread, packet: Packet(my_packet), |
