From 7a14f4994eb4527a38d02c61fa83822df02f7b5d Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Tue, 17 Feb 2015 23:48:32 +1100 Subject: Update tests for the Send - 'static change. --- src/libstd/old_io/net/pipe.rs | 2 +- src/libstd/process.rs | 2 +- src/libstd/thread.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/old_io/net/pipe.rs b/src/libstd/old_io/net/pipe.rs index 8c4a10a55d4..6dd73273122 100644 --- a/src/libstd/old_io/net/pipe.rs +++ b/src/libstd/old_io/net/pipe.rs @@ -287,7 +287,7 @@ mod tests { pub fn smalltest(server: F, client: G) where F : FnOnce(UnixStream), F : Send, - G : FnOnce(UnixStream), G : Send + G : FnOnce(UnixStream), G : Send + 'static { let path1 = next_test_unix(); let path2 = path1.clone(); diff --git a/src/libstd/process.rs b/src/libstd/process.rs index d2b98ec8939..05b5e47103f 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -458,7 +458,7 @@ impl Child { /// the parent waits for the child to exit. pub fn wait_with_output(mut self) -> io::Result { drop(self.stdin.take()); - fn read(stream: Option) -> Receiver>> { + fn read(stream: Option) -> Receiver>> { let (tx, rx) = channel(); match stream { Some(stream) => { diff --git a/src/libstd/thread.rs b/src/libstd/thread.rs index c662a1dafa1..d5dcdca5fbf 100644 --- a/src/libstd/thread.rs +++ b/src/libstd/thread.rs @@ -630,7 +630,7 @@ mod test { rx.recv().unwrap(); } - fn avoid_copying_the_body(spawnfn: F) where F: FnOnce(Thunk) { + fn avoid_copying_the_body(spawnfn: F) where F: FnOnce(Thunk<'static>) { let (tx, rx) = channel::(); let x = box 1; @@ -677,7 +677,7 @@ mod test { // (well, it would if the constant were 8000+ - I lowered it to be more // valgrind-friendly. try this at home, instead..!) static GENERATIONS: uint = 16; - fn child_no(x: uint) -> Thunk { + fn child_no(x: uint) -> Thunk<'static> { return Thunk::new(move|| { if x < GENERATIONS { Thread::spawn(move|| child_no(x+1).invoke(())); -- cgit 1.4.1-3-g733a5