]>
Commit | Line | Data |
---|---|---|
532ac7d7 | 1 | /*! ```compile_fail,E0277 |
2c00a5a8 XL |
2 | |
3 | // Check that we can't use the par-iter API to access contents of a `Cell`. | |
4 | ||
5 | use rayon::prelude::*; | |
6 | use std::cell::Cell; | |
7 | ||
8 | fn main() { | |
9 | let c = Cell::new(42_i32); | |
10 | (0_i32..1024).into_par_iter() | |
83c7162d | 11 | .map(|_| c.get()) //~ ERROR E0277 |
2c00a5a8 XL |
12 | .min(); |
13 | } | |
532ac7d7 XL |
14 | |
15 | ``` */ |