fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
3.1 KiB88 linesraw
1error: called `is_some()` after searching an `Iterator` with `find`
2  --> $DIR/search_is_some.rs:15:13
3   |
4LL |       let _ = v.iter().find(|&x| {
5   |  _____________^
6LL | |                               *x < 0
7LL | |                           }
8LL | |                    ).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   = help: to override `-D warnings` add `#[allow(clippy::search_is_some)]`
14
15error: called `is_some()` after searching an `Iterator` with `position`
16  --> $DIR/search_is_some.rs:21:13
17   |
18LL |       let _ = v.iter().position(|&x| {
19   |  _____________^
20LL | |                                   x < 0
21LL | |                               }
22LL | |                    ).is_some();
23   | |______________________________^
24   |
25   = help: this is more succinctly expressed by calling `any()`
26
27error: called `is_some()` after searching an `Iterator` with `rposition`
28  --> $DIR/search_is_some.rs:27:13
29   |
30LL |       let _ = v.iter().rposition(|&x| {
31   |  _____________^
32LL | |                                    x < 0
33LL | |                                }
34LL | |                    ).is_some();
35   | |______________________________^
36   |
37   = help: this is more succinctly expressed by calling `any()`
38
39error: called `is_some()` after searching an `Iterator` with `find`
40  --> $DIR/search_is_some.rs:42:20
41   |
42LL |     let _ = (0..1).find(some_closure).is_some();
43   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `any()` instead: `any(some_closure)`
44
45error: called `is_none()` after searching an `Iterator` with `find`
46  --> $DIR/search_is_some.rs:52:13
47   |
48LL |       let _ = v.iter().find(|&x| {
49   |  _____________^
50LL | |                               *x < 0
51LL | |                           }
52LL | |                    ).is_none();
53   | |______________________________^
54   |
55   = help: this is more succinctly expressed by calling `any()` with negation
56
57error: called `is_none()` after searching an `Iterator` with `position`
58  --> $DIR/search_is_some.rs:58:13
59   |
60LL |       let _ = v.iter().position(|&x| {
61   |  _____________^
62LL | |                                   x < 0
63LL | |                               }
64LL | |                    ).is_none();
65   | |______________________________^
66   |
67   = help: this is more succinctly expressed by calling `any()` with negation
68
69error: called `is_none()` after searching an `Iterator` with `rposition`
70  --> $DIR/search_is_some.rs:64:13
71   |
72LL |       let _ = v.iter().rposition(|&x| {
73   |  _____________^
74LL | |                                    x < 0
75LL | |                                }
76LL | |                    ).is_none();
77   | |______________________________^
78   |
79   = help: this is more succinctly expressed by calling `any()` with negation
80
81error: called `is_none()` after searching an `Iterator` with `find`
82  --> $DIR/search_is_some.rs:79:13
83   |
84LL |     let _ = (0..1).find(some_closure).is_none();
85   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.any()` instead: `!(0..1).any(some_closure)`
86
87error: aborting due to 8 previous errors
88