about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/search_is_some.stderr
blob: d5412f901110769e25b167c55f63ccccc3f8bc77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
error: called `is_some()` after searching an `Iterator` with `find`
  --> tests/ui/search_is_some.rs:16:13
   |
LL |       let _ = v.iter().find(|&x| {
   |  _____________^
LL | |
LL | |                               *x < 0
LL | |                           }
LL | |                    ).is_some();
   | |______________________________^
   |
   = help: this is more succinctly expressed by calling `any()`
   = note: `-D clippy::search-is-some` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::search_is_some)]`

error: called `is_some()` after searching an `Iterator` with `position`
  --> tests/ui/search_is_some.rs:23:13
   |
LL |       let _ = v.iter().position(|&x| {
   |  _____________^
LL | |
LL | |                                   x < 0
LL | |                               }
LL | |                    ).is_some();
   | |______________________________^
   |
   = help: this is more succinctly expressed by calling `any()`

error: called `is_some()` after searching an `Iterator` with `rposition`
  --> tests/ui/search_is_some.rs:30:13
   |
LL |       let _ = v.iter().rposition(|&x| {
   |  _____________^
LL | |
LL | |                                    x < 0
LL | |                                }
LL | |                    ).is_some();
   | |______________________________^
   |
   = help: this is more succinctly expressed by calling `any()`

error: called `is_some()` after searching an `Iterator` with `find`
  --> tests/ui/search_is_some.rs:46:20
   |
LL |     let _ = (0..1).find(some_closure).is_some();
   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(some_closure)`

error: called `is_none()` after searching an `Iterator` with `find`
  --> tests/ui/search_is_some.rs:57:13
   |
LL |       let _ = v.iter().find(|&x| {
   |  _____________^
LL | |
LL | |                               *x < 0
LL | |                           }
LL | |                    ).is_none();
   | |______________________________^
   |
   = help: this is more succinctly expressed by calling `any()` with negation

error: called `is_none()` after searching an `Iterator` with `position`
  --> tests/ui/search_is_some.rs:64:13
   |
LL |       let _ = v.iter().position(|&x| {
   |  _____________^
LL | |
LL | |                                   x < 0
LL | |                               }
LL | |                    ).is_none();
   | |______________________________^
   |
   = help: this is more succinctly expressed by calling `any()` with negation

error: called `is_none()` after searching an `Iterator` with `rposition`
  --> tests/ui/search_is_some.rs:71:13
   |
LL |       let _ = v.iter().rposition(|&x| {
   |  _____________^
LL | |
LL | |                                    x < 0
LL | |                                }
LL | |                    ).is_none();
   | |______________________________^
   |
   = help: this is more succinctly expressed by calling `any()` with negation

error: called `is_none()` after searching an `Iterator` with `find`
  --> tests/ui/search_is_some.rs:87:13
   |
LL |     let _ = (0..1).find(some_closure).is_none();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `!(0..1).any(some_closure)`

error: called `is_some()` after searching an `Iterator` with `find`
  --> tests/ui/search_is_some.rs:94:20
   |
LL |       let has_even = values
   |  ____________________^
LL | |
LL | |         .iter()
LL | |         .find(|v| match v {
...  |
LL | |         })
LL | |         .is_some();
   | |__________________^
   |
   = help: this is more succinctly expressed by calling `any()`

error: aborting due to 9 previous errors