Name Description Size
cannot_collect_filtermap_data.rs ! ```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. 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 ``` 332
cannot_zip_filtered_data.rs ! ```compile_fail,E0277 use rayon::prelude::*; // zip requires data of exact size, but filter yields only bounded // size, so check that we cannot apply it. let mut a: Vec<usize> = (0..1024).rev().collect(); let b: Vec<usize> = (0..1024).collect(); a.par_iter() .zip(b.par_iter().filter(|&&x| x > 3)); //~ ERROR ``` 330
cell_par_iter.rs ! ```compile_fail,E0277 // Check that we can't use the par-iter API to access contents of a `Cell`. use rayon::prelude::*; use std::cell::Cell; let c = Cell::new(42_i32); (0_i32..1024).into_par_iter() .map(|_| c.get()) //~ ERROR E0277 .min(); ``` 264
mod.rs 188
must_use.rs v.par_iter().step_by(2); 3053
no_send_par_iter.rs ```compile_fail,E0277 use rayon::prelude::*; use std::ptr::null; #[derive(Copy, Clone)] struct NoSend(*const ()); unsafe impl Sync for NoSend {} let x = Some(NoSend(null())); x.par_iter() .map(|&x| x) //~ ERROR .count(); //~ ERROR ``` 864
rc_par_iter.rs ! ```compile_fail,E0599 // Check that we can't use the par-iter API to access contents of an // `Rc`. use rayon::prelude::*; use std::rc::Rc; let x = vec![Rc::new(22), Rc::new(23)]; let mut y = vec![]; x.into_par_iter() //~ ERROR no method named `into_par_iter` .map(|rc| *rc) .collect_into_vec(&mut y); ``` 325