Module rayon::compile_fail::no_send_par_iter::cloned

source ·
Expand description

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()
   .cloned() //~ ERROR
   .count(); //~ ERROR