]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/search_is_some_fixable.stderr
Auto merge of #84620 - Dylan-DPC:rollup-wkv97im, r=Dylan-DPC
[rust.git] / src / tools / clippy / tests / ui / search_is_some_fixable.stderr
1 error: called `is_some()` after searching an `Iterator` with `find`
2   --> $DIR/search_is_some_fixable.rs:10:22
3    |
4 LL |     let _ = v.iter().find(|&x| *x < 0).is_some();
5    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `any()` instead: `any(|x| *x < 0)`
6    |
7    = note: `-D clippy::search-is-some` implied by `-D warnings`
8
9 error: called `is_some()` after searching an `Iterator` with `find`
10   --> $DIR/search_is_some_fixable.rs:11:20
11    |
12 LL |     let _ = (0..1).find(|x| **y == *x).is_some(); // one dereference less
13    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `any()` instead: `any(|x| **y == x)`
14
15 error: called `is_some()` after searching an `Iterator` with `find`
16   --> $DIR/search_is_some_fixable.rs:12:20
17    |
18 LL |     let _ = (0..1).find(|x| *x == 0).is_some();
19    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `any()` instead: `any(|x| x == 0)`
20
21 error: called `is_some()` after searching an `Iterator` with `find`
22   --> $DIR/search_is_some_fixable.rs:13:22
23    |
24 LL |     let _ = v.iter().find(|x| **x == 0).is_some();
25    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `any()` instead: `any(|x| *x == 0)`
26
27 error: called `is_some()` after searching an `Iterator` with `position`
28   --> $DIR/search_is_some_fixable.rs:16:22
29    |
30 LL |     let _ = v.iter().position(|&x| x < 0).is_some();
31    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `any()` instead: `any(|&x| x < 0)`
32
33 error: called `is_some()` after searching an `Iterator` with `rposition`
34   --> $DIR/search_is_some_fixable.rs:19:22
35    |
36 LL |     let _ = v.iter().rposition(|&x| x < 0).is_some();
37    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `any()` instead: `any(|&x| x < 0)`
38
39 error: called `is_some()` after calling `find()` on a string
40   --> $DIR/search_is_some_fixable.rs:24:27
41    |
42 LL |     let _ = "hello world".find("world").is_some();
43    |                           ^^^^^^^^^^^^^^^^^^^^^^^ help: use `contains()` instead: `contains("world")`
44
45 error: called `is_some()` after calling `find()` on a string
46   --> $DIR/search_is_some_fixable.rs:25:27
47    |
48 LL |     let _ = "hello world".find(&s2).is_some();
49    |                           ^^^^^^^^^^^^^^^^^^^ help: use `contains()` instead: `contains(&s2)`
50
51 error: called `is_some()` after calling `find()` on a string
52   --> $DIR/search_is_some_fixable.rs:26:27
53    |
54 LL |     let _ = "hello world".find(&s2[2..]).is_some();
55    |                           ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `contains()` instead: `contains(&s2[2..])`
56
57 error: called `is_some()` after calling `find()` on a string
58   --> $DIR/search_is_some_fixable.rs:28:16
59    |
60 LL |     let _ = s1.find("world").is_some();
61    |                ^^^^^^^^^^^^^^^^^^^^^^^ help: use `contains()` instead: `contains("world")`
62
63 error: called `is_some()` after calling `find()` on a string
64   --> $DIR/search_is_some_fixable.rs:29:16
65    |
66 LL |     let _ = s1.find(&s2).is_some();
67    |                ^^^^^^^^^^^^^^^^^^^ help: use `contains()` instead: `contains(&s2)`
68
69 error: called `is_some()` after calling `find()` on a string
70   --> $DIR/search_is_some_fixable.rs:30:16
71    |
72 LL |     let _ = s1.find(&s2[2..]).is_some();
73    |                ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `contains()` instead: `contains(&s2[2..])`
74
75 error: called `is_some()` after calling `find()` on a string
76   --> $DIR/search_is_some_fixable.rs:32:21
77    |
78 LL |     let _ = s1[2..].find("world").is_some();
79    |                     ^^^^^^^^^^^^^^^^^^^^^^^ help: use `contains()` instead: `contains("world")`
80
81 error: called `is_some()` after calling `find()` on a string
82   --> $DIR/search_is_some_fixable.rs:33:21
83    |
84 LL |     let _ = s1[2..].find(&s2).is_some();
85    |                     ^^^^^^^^^^^^^^^^^^^ help: use `contains()` instead: `contains(&s2)`
86
87 error: called `is_some()` after calling `find()` on a string
88   --> $DIR/search_is_some_fixable.rs:34:21
89    |
90 LL |     let _ = s1[2..].find(&s2[2..]).is_some();
91    |                     ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `contains()` instead: `contains(&s2[2..])`
92
93 error: called `is_none()` after searching an `Iterator` with `find`
94   --> $DIR/search_is_some_fixable.rs:42:13
95    |
96 LL |     let _ = v.iter().find(|&x| *x < 0).is_none();
97    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.any()` instead: `!v.iter().any(|x| *x < 0)`
98
99 error: called `is_none()` after searching an `Iterator` with `find`
100   --> $DIR/search_is_some_fixable.rs:43:13
101    |
102 LL |     let _ = (0..1).find(|x| **y == *x).is_none(); // one dereference less
103    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.any()` instead: `!(0..1).any(|x| **y == x)`
104
105 error: called `is_none()` after searching an `Iterator` with `find`
106   --> $DIR/search_is_some_fixable.rs:44:13
107    |
108 LL |     let _ = (0..1).find(|x| *x == 0).is_none();
109    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.any()` instead: `!(0..1).any(|x| x == 0)`
110
111 error: called `is_none()` after searching an `Iterator` with `find`
112   --> $DIR/search_is_some_fixable.rs:45:13
113    |
114 LL |     let _ = v.iter().find(|x| **x == 0).is_none();
115    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.any()` instead: `!v.iter().any(|x| *x == 0)`
116
117 error: called `is_none()` after searching an `Iterator` with `position`
118   --> $DIR/search_is_some_fixable.rs:48:13
119    |
120 LL |     let _ = v.iter().position(|&x| x < 0).is_none();
121    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.any()` instead: `!v.iter().any(|&x| x < 0)`
122
123 error: called `is_none()` after searching an `Iterator` with `rposition`
124   --> $DIR/search_is_some_fixable.rs:51:13
125    |
126 LL |     let _ = v.iter().rposition(|&x| x < 0).is_none();
127    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.any()` instead: `!v.iter().any(|&x| x < 0)`
128
129 error: called `is_none()` after calling `find()` on a string
130   --> $DIR/search_is_some_fixable.rs:57:13
131    |
132 LL |     let _ = "hello world".find("world").is_none();
133    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.contains()` instead: `!"hello world".contains("world")`
134
135 error: called `is_none()` after calling `find()` on a string
136   --> $DIR/search_is_some_fixable.rs:58:13
137    |
138 LL |     let _ = "hello world".find(&s2).is_none();
139    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.contains()` instead: `!"hello world".contains(&s2)`
140
141 error: called `is_none()` after calling `find()` on a string
142   --> $DIR/search_is_some_fixable.rs:59:13
143    |
144 LL |     let _ = "hello world".find(&s2[2..]).is_none();
145    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.contains()` instead: `!"hello world".contains(&s2[2..])`
146
147 error: called `is_none()` after calling `find()` on a string
148   --> $DIR/search_is_some_fixable.rs:61:13
149    |
150 LL |     let _ = s1.find("world").is_none();
151    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.contains()` instead: `!s1.contains("world")`
152
153 error: called `is_none()` after calling `find()` on a string
154   --> $DIR/search_is_some_fixable.rs:62:13
155    |
156 LL |     let _ = s1.find(&s2).is_none();
157    |             ^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.contains()` instead: `!s1.contains(&s2)`
158
159 error: called `is_none()` after calling `find()` on a string
160   --> $DIR/search_is_some_fixable.rs:63:13
161    |
162 LL |     let _ = s1.find(&s2[2..]).is_none();
163    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.contains()` instead: `!s1.contains(&s2[2..])`
164
165 error: called `is_none()` after calling `find()` on a string
166   --> $DIR/search_is_some_fixable.rs:65:13
167    |
168 LL |     let _ = s1[2..].find("world").is_none();
169    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.contains()` instead: `!s1[2..].contains("world")`
170
171 error: called `is_none()` after calling `find()` on a string
172   --> $DIR/search_is_some_fixable.rs:66:13
173    |
174 LL |     let _ = s1[2..].find(&s2).is_none();
175    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.contains()` instead: `!s1[2..].contains(&s2)`
176
177 error: called `is_none()` after calling `find()` on a string
178   --> $DIR/search_is_some_fixable.rs:67:13
179    |
180 LL |     let _ = s1[2..].find(&s2[2..]).is_none();
181    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.contains()` instead: `!s1[2..].contains(&s2[2..])`
182
183 error: aborting due to 30 previous errors
184