aboutsummaryrefslogtreecommitdiff
path: root/src/compile_fail/cannot_collect_filtermap_data.rs
blob: 65ff875321ea08d6a25846109a0ba0e8a0cba22f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*! ```compile_fail,E0599

use rayon::prelude::*;

// zip requires data of exact size, but filter yields only bounded
// size, so check that we cannot apply it.

fn main() {
    let a: Vec<usize> = (0..1024).collect();
    let mut v = vec![];
    a.par_iter()
     .filter_map(|&x| Some(x as f32))
     .collect_into_vec(&mut v); //~ ERROR no method
}

``` */