diff options
Diffstat (limited to '')
-rw-r--r-- | vendor/rayon/src/compile_fail/cannot_collect_filtermap_data.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/rayon/src/compile_fail/cannot_collect_filtermap_data.rs b/vendor/rayon/src/compile_fail/cannot_collect_filtermap_data.rs new file mode 100644 index 000000000..65ff87532 --- /dev/null +++ b/vendor/rayon/src/compile_fail/cannot_collect_filtermap_data.rs @@ -0,0 +1,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 +} + +``` */ |