11error: defining a method called `add` on this type; consider implementing the `std::ops::Add` trait or choosing a less ambiguous name
2- --> $DIR/methods.rs:39 :5
2+ --> $DIR/methods.rs:40 :5
33 |
44LL | / pub fn add(self, other: T) -> T {
55LL | | self
99 = note: `-D clippy::should-implement-trait` implied by `-D warnings`
1010
1111error: methods called `new` usually return `Self`
12- --> $DIR/methods.rs:169 :5
12+ --> $DIR/methods.rs:174 :5
1313 |
1414LL | / fn new() -> i32 {
1515LL | | 0
@@ -19,7 +19,7 @@ LL | | }
1919 = note: `-D clippy::new-ret-no-self` implied by `-D warnings`
2020
2121error: called `filter(p).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(p)` instead.
22- --> $DIR/methods.rs:188 :13
22+ --> $DIR/methods.rs:193 :13
2323 |
2424LL | let _ = v.iter().filter(|&x| *x < 0).next();
2525 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -28,7 +28,7 @@ LL | let _ = v.iter().filter(|&x| *x < 0).next();
2828 = note: replace `filter(|&x| *x < 0).next()` with `find(|&x| *x < 0)`
2929
3030error: called `filter(p).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(p)` instead.
31- --> $DIR/methods.rs:191 :13
31+ --> $DIR/methods.rs:196 :13
3232 |
3333LL | let _ = v.iter().filter(|&x| {
3434 | _____________^
@@ -38,33 +38,33 @@ LL | | ).next();
3838 | |___________________________^
3939
4040error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
41- --> $DIR/methods.rs:208 :22
41+ --> $DIR/methods.rs:213 :22
4242 |
4343LL | let _ = v.iter().find(|&x| *x < 0).is_some();
4444 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|x| *x < 0)`
4545 |
4646 = note: `-D clippy::search-is-some` implied by `-D warnings`
4747
4848error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
49- --> $DIR/methods.rs:209 :20
49+ --> $DIR/methods.rs:214 :20
5050 |
5151LL | let _ = (0..1).find(|x| **y == *x).is_some(); // one dereference less
5252 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|x| **y == x)`
5353
5454error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
55- --> $DIR/methods.rs:210 :20
55+ --> $DIR/methods.rs:215 :20
5656 |
5757LL | let _ = (0..1).find(|x| *x == 0).is_some();
5858 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|x| x == 0)`
5959
6060error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
61- --> $DIR/methods.rs:211 :22
61+ --> $DIR/methods.rs:216 :22
6262 |
6363LL | let _ = v.iter().find(|x| **x == 0).is_some();
6464 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|x| *x == 0)`
6565
6666error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
67- --> $DIR/methods.rs:214 :13
67+ --> $DIR/methods.rs:219 :13
6868 |
6969LL | let _ = v.iter().find(|&x| {
7070 | _____________^
@@ -74,13 +74,13 @@ LL | | ).is_some();
7474 | |______________________________^
7575
7676error: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`.
77- --> $DIR/methods.rs:220 :22
77+ --> $DIR/methods.rs:225 :22
7878 |
7979LL | let _ = v.iter().position(|&x| x < 0).is_some();
8080 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|&x| x < 0)`
8181
8282error: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`.
83- --> $DIR/methods.rs:223 :13
83+ --> $DIR/methods.rs:228 :13
8484 |
8585LL | let _ = v.iter().position(|&x| {
8686 | _____________^
@@ -90,13 +90,13 @@ LL | | ).is_some();
9090 | |______________________________^
9191
9292error: called `is_some()` after searching an `Iterator` with rposition. This is more succinctly expressed by calling `any()`.
93- --> $DIR/methods.rs:229 :22
93+ --> $DIR/methods.rs:234 :22
9494 |
9595LL | let _ = v.iter().rposition(|&x| x < 0).is_some();
9696 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|&x| x < 0)`
9797
9898error: called `is_some()` after searching an `Iterator` with rposition. This is more succinctly expressed by calling `any()`.
99- --> $DIR/methods.rs:232 :13
99+ --> $DIR/methods.rs:237 :13
100100 |
101101LL | let _ = v.iter().rposition(|&x| {
102102 | _____________^
0 commit comments