Sum of N primes in parallel-ish
It isn't clear to me what you are asking. However, I was able to update your code and run it:

use std::thread;

struct PrimeIncrement(i64);

impl Iterator for PrimeIncrement {
    type Item = i64;
    fn next(&amp;mut self) -&gt; Option&lt;i64&gt; {
        self.0 += 4; // What do you mean "integer overflow"? ^_^
        Some(self.0)
    }
}

fn main() {
    let path_1 = thread::scoped(|| {
        PrimeIncrement(3).filter(prime).take_while(|&amp;n| n &lt;= 7919).fold(0, |a, b| a + b)
    });
    let path_2 = thread::scoped(|| {
        PrimeIncrement(5).filter(prime).take_while(|&amp;n| n &lt;= 7919).fold(0, |a, b| a + b)
    });

    let a = path_1.join();
    let b = path_2.join();

    println!("{}", 2 + a + b);
}

fn prime(n: &amp;i64) -&gt; bool {
    match n {
        &amp;1 =&gt; false,
        &amp;2 =&gt; true,
        &amp;3 =&gt; true,
        n if *n % 2 == 0 =&gt; false,
        _ =&gt; {
            let max = (*n as f64).sqrt() as i64 + 1;
            !(2..max).any(|i| *n % i == 0)
        }
    }
}


The main changes were:


Removing Unfold, as it isn't stable in the 1.0 beta.
Using thread::scoped instead of a Future.
Using i64 instead of int


Update for Rust 1.3

The thread::scoped API was found to have soundness problems and has been deprecated. In this case, thread::spawn is powerful enough, so I've replaced that:

use std::thread;

struct PrimeIncrement(i64);

impl Iterator for PrimeIncrement {
    type Item = i64;
    fn next(&amp;mut self) -&gt; Option&lt;i64&gt; {
        self.0 += 4; // What do you mean "integer overflow"? ^_^
        Some(self.0)
    }
}

fn main() {
    let path_1 = thread::spawn(|| {
        PrimeIncrement(3).filter(prime).take_while(|&amp;n| n &lt;= 7919).fold(0, |a, b| a + b)
    });
    let path_2 = thread::spawn(|| {
        PrimeIncrement(5).filter(prime).take_while(|&amp;n| n &lt;= 7919).fold(0, |a, b| a + b)
    });

    let a = path_1.join().unwrap();
    let b = path_2.join().unwrap();

    println!("{}", 2 + a + b);
}

fn prime(n: &amp;i64) -&gt; bool {
    match *n {
        1 =&gt; false,
        2 =&gt; true,
        3 =&gt; true,
        n if n % 2 == 0 =&gt; false,
        n =&gt; {
            let max = (n as f64).sqrt() as i64 + 1;
            !(2..max).any(|i| n % i == 0)
        }
    }
}


Additionally, I now match on *n, which avoids the need to have quite as many dereferences.