1+ error: non-binding let on a type that implements `Drop`
2+ --> $DIR/filter_methods.rs:5:5
3+ |
4+ LL | let _: Vec<_> = vec![5; 6].into_iter().filter(|&x| x == 0).map(|x| x * 2).collect();
5+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6+ |
7+ = note: `-D clippy::let-underscore-drop` implied by `-D warnings`
8+ = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
9+
110error: called `filter(..).map(..)` on an `Iterator`
211 --> $DIR/filter_methods.rs:5:21
312 |
@@ -7,6 +16,18 @@ LL | let _: Vec<_> = vec![5; 6].into_iter().filter(|&x| x == 0).map(|x| x *
716 = note: `-D clippy::filter-map` implied by `-D warnings`
817 = help: this is more succinctly expressed by calling `.filter_map(..)` instead
918
19+ error: non-binding let on a type that implements `Drop`
20+ --> $DIR/filter_methods.rs:7:5
21+ |
22+ LL | / let _: Vec<_> = vec![5_i8; 6]
23+ LL | | .into_iter()
24+ LL | | .filter(|&x| x == 0)
25+ LL | | .flat_map(|x| x.checked_mul(2))
26+ LL | | .collect();
27+ | |___________________^
28+ |
29+ = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
30+
1031error: called `filter(..).flat_map(..)` on an `Iterator`
1132 --> $DIR/filter_methods.rs:7:21
1233 |
@@ -19,6 +40,18 @@ LL | | .flat_map(|x| x.checked_mul(2))
1940 |
2041 = help: this is more succinctly expressed by calling `.flat_map(..)` and filtering by returning `iter::empty()`
2142
43+ error: non-binding let on a type that implements `Drop`
44+ --> $DIR/filter_methods.rs:13:5
45+ |
46+ LL | / let _: Vec<_> = vec![5_i8; 6]
47+ LL | | .into_iter()
48+ LL | | .filter_map(|x| x.checked_mul(2))
49+ LL | | .flat_map(|x| x.checked_mul(2))
50+ LL | | .collect();
51+ | |___________________^
52+ |
53+ = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
54+
2255error: called `filter_map(..).flat_map(..)` on an `Iterator`
2356 --> $DIR/filter_methods.rs:13:21
2457 |
@@ -31,6 +64,18 @@ LL | | .flat_map(|x| x.checked_mul(2))
3164 |
3265 = help: this is more succinctly expressed by calling `.flat_map(..)` and filtering by returning `iter::empty()`
3366
67+ error: non-binding let on a type that implements `Drop`
68+ --> $DIR/filter_methods.rs:19:5
69+ |
70+ LL | / let _: Vec<_> = vec![5_i8; 6]
71+ LL | | .into_iter()
72+ LL | | .filter_map(|x| x.checked_mul(2))
73+ LL | | .map(|x| x.checked_mul(2))
74+ LL | | .collect();
75+ | |___________________^
76+ |
77+ = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
78+
3479error: called `filter_map(..).map(..)` on an `Iterator`
3580 --> $DIR/filter_methods.rs:19:21
3681 |
@@ -43,5 +88,5 @@ LL | | .map(|x| x.checked_mul(2))
4388 |
4489 = help: this is more succinctly expressed by only calling `.filter_map(..)` instead
4590
46- error: aborting due to 4 previous errors
91+ error: aborting due to 8 previous errors
4792
0 commit comments