diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-04-14 00:23:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-14 00:23:35 +0200 |
| commit | 8ad17ec6e42a2f72853d45b009569a7aaa5cab03 (patch) | |
| tree | 9edbc6d47ebfaf1da37f1747b00e05f15a84ff94 /src/libstd/thread | |
| parent | 1888b55d7b6f18e9707ff9d1a72e48905f7bfde2 (diff) | |
| parent | 6635fbed4ca8c65822f99e994735bd1877fb063e (diff) | |
| download | rust-8ad17ec6e42a2f72853d45b009569a7aaa5cab03.tar.gz rust-8ad17ec6e42a2f72853d45b009569a7aaa5cab03.zip | |
Rollup merge of #59818 - crlf0710:eliminate_libstd_fnbox, r=cramertj
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), |
