]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/search_is_some.stderr
Auto merge of #102536 - scottmcm:lookup_line-tweak, r=jackh726
[rust.git] / src / tools / clippy / tests / ui / search_is_some.stderr
1 error: called `is_some()` after searching an `Iterator` with `find`
2   --> $DIR/search_is_some.rs:14:13
3    |
4 LL |       let _ = v.iter().find(|&x| {
5    |  _____________^
6 LL | |                               *x < 0
7 LL | |                           }
8 LL | |                    ).is_some();
9    | |______________________________^
10    |
11    = help: this is more succinctly expressed by calling `any()`
12    = note: `-D clippy::search-is-some` implied by `-D warnings`
13
14 error: called `is_some()` after searching an `Iterator` with `position`
15   --> $DIR/search_is_some.rs:20:13
16    |
17 LL |       let _ = v.iter().position(|&x| {
18    |  _____________^
19 LL | |                                   x < 0
20 LL | |                               }
21 LL | |                    ).is_some();
22    | |______________________________^
23    |
24    = help: this is more succinctly expressed by calling `any()`
25
26 error: called `is_some()` after searching an `Iterator` with `rposition`
27   --> $DIR/search_is_some.rs:26:13
28    |
29 LL |       let _ = v.iter().rposition(|&x| {
30    |  _____________^
31 LL | |                                    x < 0
32 LL | |                                }
33 LL | |                    ).is_some();
34    | |______________________________^
35    |
36    = help: this is more succinctly expressed by calling `any()`
37
38 error: called `is_some()` after searching an `Iterator` with `find`
39   --> $DIR/search_is_some.rs:41:20
40    |
41 LL |     let _ = (0..1).find(some_closure).is_some();
42    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `any()` instead: `any(some_closure)`
43
44 error: called `is_none()` after searching an `Iterator` with `find`
45   --> $DIR/search_is_some.rs:51:13
46    |
47 LL |       let _ = v.iter().find(|&x| {
48    |  _____________^
49 LL | |                               *x < 0
50 LL | |                           }
51 LL | |                    ).is_none();
52    | |______________________________^
53    |
54    = help: this is more succinctly expressed by calling `any()` with negation
55
56 error: called `is_none()` after searching an `Iterator` with `position`
57   --> $DIR/search_is_some.rs:57:13
58    |
59 LL |       let _ = v.iter().position(|&x| {
60    |  _____________^
61 LL | |                                   x < 0
62 LL | |                               }
63 LL | |                    ).is_none();
64    | |______________________________^
65    |
66    = help: this is more succinctly expressed by calling `any()` with negation
67
68 error: called `is_none()` after searching an `Iterator` with `rposition`
69   --> $DIR/search_is_some.rs:63:13
70    |
71 LL |       let _ = v.iter().rposition(|&x| {
72    |  _____________^
73 LL | |                                    x < 0
74 LL | |                                }
75 LL | |                    ).is_none();
76    | |______________________________^
77    |
78    = help: this is more succinctly expressed by calling `any()` with negation
79
80 error: called `is_none()` after searching an `Iterator` with `find`
81   --> $DIR/search_is_some.rs:78:13
82    |
83 LL |     let _ = (0..1).find(some_closure).is_none();
84    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.any()` instead: `!(0..1).any(some_closure)`
85
86 error: aborting due to 8 previous errors
87