@@ -35,8 +35,14 @@ LL | | ).is_some();
3535 |
3636 = help: this is more succinctly expressed by calling `any()`
3737
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+
3844error: called `is_none()` after searching an `Iterator` with `find`
39- --> $DIR/search_is_some.rs:48 :13
45+ --> $DIR/search_is_some.rs:51 :13
4046 |
4147LL | let _ = v.iter().find(|&x| {
4248 | _____________^
@@ -48,7 +54,7 @@ LL | | ).is_none();
4854 = help: this is more succinctly expressed by calling `any()` with negation
4955
5056error: called `is_none()` after searching an `Iterator` with `position`
51- --> $DIR/search_is_some.rs:54 :13
57+ --> $DIR/search_is_some.rs:57 :13
5258 |
5359LL | let _ = v.iter().position(|&x| {
5460 | _____________^
@@ -60,7 +66,7 @@ LL | | ).is_none();
6066 = help: this is more succinctly expressed by calling `any()` with negation
6167
6268error: called `is_none()` after searching an `Iterator` with `rposition`
63- --> $DIR/search_is_some.rs:60 :13
69+ --> $DIR/search_is_some.rs:63 :13
6470 |
6571LL | let _ = v.iter().rposition(|&x| {
6672 | _____________^
@@ -71,5 +77,11 @@ LL | | ).is_none();
7177 |
7278 = help: this is more succinctly expressed by calling `any()` with negation
7379
74- error: aborting due to 6 previous errors
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
7587
0 commit comments