1
Fork 0

Update tests for the Send - 'static change.

This commit is contained in:
Huon Wilson 2015-02-17 23:48:32 +11:00
parent adfcd93f0c
commit 7a14f4994e
25 changed files with 52 additions and 183 deletions

View file

@ -630,7 +630,7 @@ mod test {
rx.recv().unwrap();
}
fn avoid_copying_the_body<F>(spawnfn: F) where F: FnOnce(Thunk) {
fn avoid_copying_the_body<F>(spawnfn: F) where F: FnOnce(Thunk<'static>) {
let (tx, rx) = channel::<uint>();
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(()));