aboutsummaryrefslogtreecommitdiff
path: root/src/compile_fail/no_send_par_iter.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/compile_fail/no_send_par_iter.rs')
-rw-r--r--src/compile_fail/no_send_par_iter.rs30
1 files changed, 12 insertions, 18 deletions
diff --git a/src/compile_fail/no_send_par_iter.rs b/src/compile_fail/no_send_par_iter.rs
index 1362c98..7573c03 100644
--- a/src/compile_fail/no_send_par_iter.rs
+++ b/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 {}