diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2014-11-26 08:12:18 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2014-12-14 04:21:56 -0500 |
| commit | 5c3d3989192f88b16f39d554c3844700c91b6c8e (patch) | |
| tree | 59c77544a06d3f4c2d363b5afe37c91a444e78d6 /src/libstd/sys | |
| parent | 394f6846b80240480f8d7ce4b3d5d4c42ba85201 (diff) | |
| download | rust-5c3d3989192f88b16f39d554c3844700c91b6c8e.tar.gz rust-5c3d3989192f88b16f39d554c3844700c91b6c8e.zip | |
Mostly rote conversion of `proc()` to `move||` (and occasionally `Thunk::new`)
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/common/helper_thread.rs | 4 | ||||
| -rw-r--r-- | src/libstd/sys/unix/process.rs | 4 | ||||
| -rw-r--r-- | src/libstd/sys/windows/thread_local.rs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/sys/common/helper_thread.rs b/src/libstd/sys/common/helper_thread.rs index 6c5fc3005ed..96b4accd4bd 100644 --- a/src/libstd/sys/common/helper_thread.rs +++ b/src/libstd/sys/common/helper_thread.rs @@ -83,7 +83,7 @@ impl<M: Send> Helper<M> { *self.signal.get() = send as uint; let t = f(); - task::spawn(proc() { + task::spawn(move |:| { bookkeeping::decrement(); helper(receive, rx, t); let _g = self.lock.lock(); @@ -91,7 +91,7 @@ impl<M: Send> Helper<M> { self.cond.notify_one() }); - rustrt::at_exit(proc() { self.shutdown() }); + rustrt::at_exit(move|:| { self.shutdown() }); *self.initialized.get() = true; } } diff --git a/src/libstd/sys/unix/process.rs b/src/libstd/sys/unix/process.rs index f71b34304ab..4ef1757cc3a 100644 --- a/src/libstd/sys/unix/process.rs +++ b/src/libstd/sys/unix/process.rs @@ -94,8 +94,8 @@ impl Process { mem::transmute::<&ProcessConfig<K,V>,&'static ProcessConfig<K,V>>(cfg) }; - with_envp(cfg.env(), proc(envp) { - with_argv(cfg.program(), cfg.args(), proc(argv) unsafe { + with_envp(cfg.env(), move|: envp: *const c_void| { + with_argv(cfg.program(), cfg.args(), move|: argv: *const *const libc::c_char| unsafe { let (input, mut output) = try!(sys::os::pipe()); // We may use this in the child, so perform allocations before the diff --git a/src/libstd/sys/windows/thread_local.rs b/src/libstd/sys/windows/thread_local.rs index b841f6d3a2b..969b322af99 100644 --- a/src/libstd/sys/windows/thread_local.rs +++ b/src/libstd/sys/windows/thread_local.rs @@ -131,7 +131,7 @@ fn init_dtors() { DTORS = mem::transmute(dtors); } - rustrt::at_exit(proc() unsafe { + rustrt::at_exit(move|| unsafe { mem::transmute::<_, Box<Exclusive<Vec<(Key, Dtor)>>>>(DTORS); DTORS = 0 as *mut _; }); |
