Skip to content

Commit

Permalink
Merge pull request #380 from cuviper/must_use
Browse files Browse the repository at this point in the history
test: update the `unused_must_use` error pattern
  • Loading branch information
cuviper authored Jun 24, 2017
2 parents 2114008 + b9fa1a2 commit 9767730
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions tests/compile-fail/must_use.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ use rayon::prelude::*;
fn main() {
let v: Vec<_> = (0..100).map(Some).collect();

v.par_iter().chain(&v); //~ ERROR unused result
v.par_iter().cloned(); //~ ERROR unused result
v.par_iter().enumerate(); //~ ERROR unused result
v.par_iter().filter(|_| true); //~ ERROR unused result
v.par_iter().filter_map(|x| *x); //~ ERROR unused result
v.par_iter().flat_map(|x| *x); //~ ERROR unused result
v.par_iter().fold(|| 0, |x, _| x); //~ ERROR unused result
v.par_iter().fold_with(0, |x, _| x); //~ ERROR unused result
v.par_iter().inspect(|_| {}); //~ ERROR unused result
v.par_iter().map(|x| x); //~ ERROR unused result
v.par_iter().map_with(0, |_, x| x); //~ ERROR unused result
v.par_iter().rev(); //~ ERROR unused result
v.par_iter().skip(1); //~ ERROR unused result
v.par_iter().take(1); //~ ERROR unused result
v.par_iter().cloned().while_some(); //~ ERROR unused result
v.par_iter().with_max_len(1); //~ ERROR unused result
v.par_iter().with_min_len(1); //~ ERROR unused result
v.par_iter().zip(&v); //~ ERROR unused result
v.par_iter().chain(&v); //~ ERROR must be used
v.par_iter().cloned(); //~ ERROR must be used
v.par_iter().enumerate(); //~ ERROR must be used
v.par_iter().filter(|_| true); //~ ERROR must be used
v.par_iter().filter_map(|x| *x); //~ ERROR must be used
v.par_iter().flat_map(|x| *x); //~ ERROR must be used
v.par_iter().fold(|| 0, |x, _| x); //~ ERROR must be used
v.par_iter().fold_with(0, |x, _| x); //~ ERROR must be used
v.par_iter().inspect(|_| {}); //~ ERROR must be used
v.par_iter().map(|x| x); //~ ERROR must be used
v.par_iter().map_with(0, |_, x| x); //~ ERROR must be used
v.par_iter().rev(); //~ ERROR must be used
v.par_iter().skip(1); //~ ERROR must be used
v.par_iter().take(1); //~ ERROR must be used
v.par_iter().cloned().while_some(); //~ ERROR must be used
v.par_iter().with_max_len(1); //~ ERROR must be used
v.par_iter().with_min_len(1); //~ ERROR must be used
v.par_iter().zip(&v); //~ ERROR must be used
}

0 comments on commit 9767730

Please sign in to comment.