]> git.lizzy.rs Git - rust.git/blob - tests/ui/methods.stderr
Auto merge of #6296 - flip1995:rustup, r=flip1995
[rust.git] / tests / ui / methods.stderr
1 error: methods called `new` usually return `Self`
2   --> $DIR/methods.rs:105:5
3    |
4 LL | /     fn new() -> i32 {
5 LL | |         0
6 LL | |     }
7    | |_____^
8    |
9    = note: `-D clippy::new-ret-no-self` implied by `-D warnings`
10
11 error: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead.
12   --> $DIR/methods.rs:126:13
13    |
14 LL |       let _ = v.iter().filter(|&x| {
15    |  _____________^
16 LL | |                                 *x < 0
17 LL | |                             }
18 LL | |                    ).next();
19    | |___________________________^
20    |
21    = note: `-D clippy::filter-next` implied by `-D warnings`
22
23 error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
24   --> $DIR/methods.rs:143:22
25    |
26 LL |     let _ = v.iter().find(|&x| *x < 0).is_some();
27    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|x| *x < 0)`
28    |
29    = note: `-D clippy::search-is-some` implied by `-D warnings`
30
31 error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
32   --> $DIR/methods.rs:144:20
33    |
34 LL |     let _ = (0..1).find(|x| **y == *x).is_some(); // one dereference less
35    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|x| **y == x)`
36
37 error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
38   --> $DIR/methods.rs:145:20
39    |
40 LL |     let _ = (0..1).find(|x| *x == 0).is_some();
41    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|x| x == 0)`
42
43 error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
44   --> $DIR/methods.rs:146:22
45    |
46 LL |     let _ = v.iter().find(|x| **x == 0).is_some();
47    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|x| *x == 0)`
48
49 error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
50   --> $DIR/methods.rs:149:13
51    |
52 LL |       let _ = v.iter().find(|&x| {
53    |  _____________^
54 LL | |                               *x < 0
55 LL | |                           }
56 LL | |                    ).is_some();
57    | |______________________________^
58
59 error: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`.
60   --> $DIR/methods.rs:155:22
61    |
62 LL |     let _ = v.iter().position(|&x| x < 0).is_some();
63    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|&x| x < 0)`
64
65 error: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`.
66   --> $DIR/methods.rs:158:13
67    |
68 LL |       let _ = v.iter().position(|&x| {
69    |  _____________^
70 LL | |                                   x < 0
71 LL | |                               }
72 LL | |                    ).is_some();
73    | |______________________________^
74
75 error: called `is_some()` after searching an `Iterator` with rposition. This is more succinctly expressed by calling `any()`.
76   --> $DIR/methods.rs:164:22
77    |
78 LL |     let _ = v.iter().rposition(|&x| x < 0).is_some();
79    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|&x| x < 0)`
80
81 error: called `is_some()` after searching an `Iterator` with rposition. This is more succinctly expressed by calling `any()`.
82   --> $DIR/methods.rs:167:13
83    |
84 LL |       let _ = v.iter().rposition(|&x| {
85    |  _____________^
86 LL | |                                    x < 0
87 LL | |                                }
88 LL | |                    ).is_some();
89    | |______________________________^
90
91 error: aborting due to 11 previous errors
92