summaryrefslogtreecommitdiffstats
path: root/vendor/rayon/src/compile_fail
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/rayon/src/compile_fail')
-rw-r--r--vendor/rayon/src/compile_fail/cannot_collect_filtermap_data.rs12
-rw-r--r--vendor/rayon/src/compile_fail/cannot_zip_filtered_data.rs10
-rw-r--r--vendor/rayon/src/compile_fail/cell_par_iter.rs10
-rw-r--r--vendor/rayon/src/compile_fail/must_use.rs2
-rw-r--r--vendor/rayon/src/compile_fail/no_send_par_iter.rs30
-rw-r--r--vendor/rayon/src/compile_fail/rc_par_iter.rs12
6 files changed, 32 insertions, 44 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
index 65ff87532..bb62ce02f 100644
--- a/vendor/rayon/src/compile_fail/cannot_collect_filtermap_data.rs
+++ b/vendor/rayon/src/compile_fail/cannot_collect_filtermap_data.rs
@@ -5,12 +5,10 @@ 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
-}
+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
``` */
diff --git a/vendor/rayon/src/compile_fail/cannot_zip_filtered_data.rs b/vendor/rayon/src/compile_fail/cannot_zip_filtered_data.rs
index de43fca57..54fd50de1 100644
--- a/vendor/rayon/src/compile_fail/cannot_zip_filtered_data.rs
+++ b/vendor/rayon/src/compile_fail/cannot_zip_filtered_data.rs
@@ -5,12 +5,10 @@ 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 mut a: Vec<usize> = (0..1024).rev().collect();
- let b: Vec<usize> = (0..1024).collect();
+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
-}
+a.par_iter()
+ .zip(b.par_iter().filter(|&&x| x > 3)); //~ ERROR
``` */
diff --git a/vendor/rayon/src/compile_fail/cell_par_iter.rs b/vendor/rayon/src/compile_fail/cell_par_iter.rs
index 4af04b124..98a1cf96e 100644
--- a/vendor/rayon/src/compile_fail/cell_par_iter.rs
+++ b/vendor/rayon/src/compile_fail/cell_par_iter.rs
@@ -5,11 +5,9 @@
use rayon::prelude::*;
use std::cell::Cell;
-fn main() {
- let c = Cell::new(42_i32);
- (0_i32..1024).into_par_iter()
- .map(|_| c.get()) //~ ERROR E0277
- .min();
-}
+let c = Cell::new(42_i32);
+(0_i32..1024).into_par_iter()
+ .map(|_| c.get()) //~ ERROR E0277
+ .min();
``` */
diff --git a/vendor/rayon/src/compile_fail/must_use.rs b/vendor/rayon/src/compile_fail/must_use.rs
index ac50a62f3..b4b3d771c 100644
--- a/vendor/rayon/src/compile_fail/must_use.rs
+++ b/vendor/rayon/src/compile_fail/must_use.rs
@@ -33,6 +33,8 @@ must_use! {
step_by /** v.par_iter().step_by(2); */
chain /** v.par_iter().chain(&v); */
chunks /** v.par_iter().chunks(2); */
+ fold_chunks /** v.par_iter().fold_chunks(2, || 0, |x, _| x); */
+ fold_chunks_with /** v.par_iter().fold_chunks_with(2, 0, |x, _| x); */
cloned /** v.par_iter().cloned(); */
copied /** v.par_iter().copied(); */
enumerate /** v.par_iter().enumerate(); */
diff --git a/vendor/rayon/src/compile_fail/no_send_par_iter.rs b/vendor/rayon/src/compile_fail/no_send_par_iter.rs
index 1362c9809..7573c0346 100644
--- a/vendor/rayon/src/compile_fail/no_send_par_iter.rs
+++ b/vendor/rayon/src/compile_fail/no_send_par_iter.rs
@@ -10,13 +10,11 @@ struct NoSend(*const ());
unsafe impl Sync for NoSend {}
-fn main() {
- let x = Some(NoSend(null()));
+let x = Some(NoSend(null()));
- x.par_iter()
- .map(|&x| x) //~ ERROR
- .count(); //~ ERROR
-}
+x.par_iter()
+ .map(|&x| x) //~ ERROR
+ .count(); //~ ERROR
``` */
mod map {}
@@ -31,13 +29,11 @@ struct NoSend(*const ());
unsafe impl Sync for NoSend {}
-fn main() {
- let x = Some(NoSend(null()));
+let x = Some(NoSend(null()));
- x.par_iter()
- .filter_map(|&x| Some(x)) //~ ERROR
- .count(); //~ ERROR
-}
+x.par_iter()
+ .filter_map(|&x| Some(x)) //~ ERROR
+ .count(); //~ ERROR
``` */
mod filter_map {}
@@ -52,13 +48,11 @@ struct NoSend(*const ());
unsafe impl Sync for NoSend {}
-fn main() {
- let x = Some(NoSend(null()));
+let x = Some(NoSend(null()));
- x.par_iter()
- .cloned() //~ ERROR
- .count(); //~ ERROR
-}
+x.par_iter()
+ .cloned() //~ ERROR
+ .count(); //~ ERROR
``` */
mod cloned {}
diff --git a/vendor/rayon/src/compile_fail/rc_par_iter.rs b/vendor/rayon/src/compile_fail/rc_par_iter.rs
index feaedb38f..aca63e7ac 100644
--- a/vendor/rayon/src/compile_fail/rc_par_iter.rs
+++ b/vendor/rayon/src/compile_fail/rc_par_iter.rs
@@ -6,12 +6,10 @@
use rayon::prelude::*;
use std::rc::Rc;
-fn main() {
- 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);
-}
+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);
``` */