diff options
Diffstat (limited to 'vendor/rayon/src/compile_fail/no_send_par_iter.rs')
-rw-r--r-- | vendor/rayon/src/compile_fail/no_send_par_iter.rs | 30 |
1 files changed, 12 insertions, 18 deletions
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 {} |