]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/filter_methods.stderr
New upstream version 1.52.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / filter_methods.stderr
CommitLineData
f20569fa
XL
1error: called `filter(..).flat_map(..)` on an `Iterator`
2 --> $DIR/filter_methods.rs:8:21
3 |
4LL | let _: Vec<_> = vec![5_i8; 6]
5 | _____________________^
6LL | | .into_iter()
7LL | | .filter(|&x| x == 0)
8LL | | .flat_map(|x| x.checked_mul(2))
9 | |_______________________________________^
10 |
11 = note: `-D clippy::filter-map` implied by `-D warnings`
12 = help: this is more succinctly expressed by calling `.flat_map(..)` and filtering by returning `iter::empty()`
13
14error: called `filter_map(..).flat_map(..)` on an `Iterator`
15 --> $DIR/filter_methods.rs:14:21
16 |
17LL | let _: Vec<_> = vec![5_i8; 6]
18 | _____________________^
19LL | | .into_iter()
20LL | | .filter_map(|x| x.checked_mul(2))
21LL | | .flat_map(|x| x.checked_mul(2))
22 | |_______________________________________^
23 |
24 = help: this is more succinctly expressed by calling `.flat_map(..)` and filtering by returning `iter::empty()`
25
26error: called `filter_map(..).map(..)` on an `Iterator`
27 --> $DIR/filter_methods.rs:20:21
28 |
29LL | let _: Vec<_> = vec![5_i8; 6]
30 | _____________________^
31LL | | .into_iter()
32LL | | .filter_map(|x| x.checked_mul(2))
33LL | | .map(|x| x.checked_mul(2))
34 | |__________________________________^
35 |
36 = help: this is more succinctly expressed by only calling `.filter_map(..)` instead
37
38error: aborting due to 3 previous errors
39