| 
1 | 1 | error: use of `filter_map` with an identity function  | 
2 |  | -  --> tests/ui/filter_map_identity.rs:6:22  | 
 | 2 | +  --> tests/ui/filter_map_identity.rs:28:45  | 
3 | 3 |    |  | 
4 |  | -LL |     let _ = iterator.filter_map(|x| x);  | 
5 |  | -   |                      ^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 4 | +LL |         copy_vec_non_inferred().into_iter().filter_map(|x| x);  | 
 | 5 | +   |                                             ^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
6 | 6 |    |  | 
7 | 7 |    = note: `-D clippy::filter-map-identity` implied by `-D warnings`  | 
8 | 8 |    = help: to override `-D warnings` add `#[allow(clippy::filter_map_identity)]`  | 
9 | 9 | 
 
  | 
10 | 10 | error: use of `filter_map` with an identity function  | 
11 |  | -  --> tests/ui/filter_map_identity.rs:9:22  | 
 | 11 | +  --> tests/ui/filter_map_identity.rs:30:45  | 
12 | 12 |    |  | 
13 |  | -LL |     let _ = iterator.filter_map(std::convert::identity);  | 
14 |  | -   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 13 | +LL |         copy_vec_non_inferred().into_iter().filter_map(std::convert::identity);  | 
 | 14 | +   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
15 | 15 | 
 
  | 
16 | 16 | error: use of `filter_map` with an identity function  | 
17 |  | -  --> tests/ui/filter_map_identity.rs:13:22  | 
 | 17 | +  --> tests/ui/filter_map_identity.rs:32:45  | 
18 | 18 |    |  | 
19 |  | -LL |     let _ = iterator.filter_map(identity);  | 
20 |  | -   |                      ^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 19 | +LL |         copy_vec_non_inferred().into_iter().filter_map(identity);  | 
 | 20 | +   |                                             ^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
21 | 21 | 
 
  | 
22 | 22 | error: use of `filter_map` with an identity function  | 
23 |  | -  --> tests/ui/filter_map_identity.rs:16:22  | 
 | 23 | +  --> tests/ui/filter_map_identity.rs:34:45  | 
24 | 24 |    |  | 
25 |  | -LL |     let _ = iterator.filter_map(|x| return x);  | 
26 |  | -   |                      ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 25 | +LL |         copy_vec_non_inferred().into_iter().filter_map(|x| return x);  | 
 | 26 | +   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
27 | 27 | 
 
  | 
28 |  | -error: aborting due to 4 previous errors  | 
 | 28 | +error: use of `filter_map` with an identity function  | 
 | 29 | +  --> tests/ui/filter_map_identity.rs:36:45  | 
 | 30 | +   |  | 
 | 31 | +LL |         copy_vec_non_inferred().into_iter().filter_map(|x| return x);  | 
 | 32 | +   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 33 | + | 
 | 34 | +error: use of `filter_map` with an identity function  | 
 | 35 | +  --> tests/ui/filter_map_identity.rs:39:36  | 
 | 36 | +   |  | 
 | 37 | +LL |         non_copy_vec().into_iter().filter_map(|x| x);  | 
 | 38 | +   |                                    ^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 39 | + | 
 | 40 | +error: use of `filter_map` with an identity function  | 
 | 41 | +  --> tests/ui/filter_map_identity.rs:41:36  | 
 | 42 | +   |  | 
 | 43 | +LL |         non_copy_vec().into_iter().filter_map(|x| x);  | 
 | 44 | +   |                                    ^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 45 | + | 
 | 46 | +error: use of `filter_map` with an identity function  | 
 | 47 | +  --> tests/ui/filter_map_identity.rs:44:36  | 
 | 48 | +   |  | 
 | 49 | +LL |         non_copy_vec().into_iter().filter_map(std::convert::identity);  | 
 | 50 | +   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 51 | + | 
 | 52 | +error: use of `filter_map` with an identity function  | 
 | 53 | +  --> tests/ui/filter_map_identity.rs:46:36  | 
 | 54 | +   |  | 
 | 55 | +LL |         non_copy_vec().into_iter().filter_map(identity);  | 
 | 56 | +   |                                    ^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 57 | + | 
 | 58 | +error: use of `filter_map` with an identity function  | 
 | 59 | +  --> tests/ui/filter_map_identity.rs:48:36  | 
 | 60 | +   |  | 
 | 61 | +LL |         non_copy_vec().into_iter().filter_map(|x| return x);  | 
 | 62 | +   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 63 | + | 
 | 64 | +error: use of `filter_map` with an identity function  | 
 | 65 | +  --> tests/ui/filter_map_identity.rs:50:36  | 
 | 66 | +   |  | 
 | 67 | +LL |         non_copy_vec().into_iter().filter_map(|x| return x);  | 
 | 68 | +   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 69 | + | 
 | 70 | +error: use of `filter_map` with an identity function  | 
 | 71 | +  --> tests/ui/filter_map_identity.rs:53:39  | 
 | 72 | +   |  | 
 | 73 | +LL |         copy_vec::<i32>().into_iter().filter_map(|x: Option<_>| x);  | 
 | 74 | +   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 75 | + | 
 | 76 | +error: use of `filter_map` with an identity function  | 
 | 77 | +  --> tests/ui/filter_map_identity.rs:55:39  | 
 | 78 | +   |  | 
 | 79 | +LL |         copy_vec::<i32>().into_iter().filter_map(|x: Option<_>| x);  | 
 | 80 | +   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 81 | + | 
 | 82 | +error: use of `filter_map` with an identity function  | 
 | 83 | +  --> tests/ui/filter_map_identity.rs:57:39  | 
 | 84 | +   |  | 
 | 85 | +LL |         copy_vec::<i32>().into_iter().filter_map(|x: Option<_>| return x);  | 
 | 86 | +   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 87 | + | 
 | 88 | +error: use of `filter_map` with an identity function  | 
 | 89 | +  --> tests/ui/filter_map_identity.rs:59:39  | 
 | 90 | +   |  | 
 | 91 | +LL |         copy_vec::<i32>().into_iter().filter_map(|x: Option<_>| return x);  | 
 | 92 | +   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 93 | + | 
 | 94 | +error: use of `filter_map` with an identity function  | 
 | 95 | +  --> tests/ui/filter_map_identity.rs:63:39  | 
 | 96 | +   |  | 
 | 97 | +LL |         copy_vec::<i32>().into_iter().filter_map(|x: Option<i32>| x);  | 
 | 98 | +   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 99 | + | 
 | 100 | +error: use of `filter_map` with an identity function  | 
 | 101 | +  --> tests/ui/filter_map_identity.rs:65:39  | 
 | 102 | +   |  | 
 | 103 | +LL |         copy_vec::<i32>().into_iter().filter_map(|x: Option<i32>| x);  | 
 | 104 | +   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 105 | + | 
 | 106 | +error: use of `filter_map` with an identity function  | 
 | 107 | +  --> tests/ui/filter_map_identity.rs:67:39  | 
 | 108 | +   |  | 
 | 109 | +LL |         copy_vec::<i32>().into_iter().filter_map(|x: Option<i32>| return x);  | 
 | 110 | +   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 111 | + | 
 | 112 | +error: use of `filter_map` with an identity function  | 
 | 113 | +  --> tests/ui/filter_map_identity.rs:69:39  | 
 | 114 | +   |  | 
 | 115 | +LL |         copy_vec::<i32>().into_iter().filter_map(|x: Option<i32>| return x);  | 
 | 116 | +   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 117 | + | 
 | 118 | +error: use of `filter_map` with an identity function  | 
 | 119 | +  --> tests/ui/filter_map_identity.rs:72:43  | 
 | 120 | +   |  | 
 | 121 | +LL |             copy_vec::<i32>().into_iter().filter_map(|x: Option<i32>| -> Option<i32> {{ x }});  | 
 | 122 | +   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 123 | + | 
 | 124 | +error: use of `filter_map` with an identity function  | 
 | 125 | +  --> tests/ui/filter_map_identity.rs:75:43  | 
 | 126 | +   |  | 
 | 127 | +LL |             copy_vec::<i32>().into_iter().filter_map(|x: Option<i32>| -> Option<i32> {{ return x }});  | 
 | 128 | +   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 129 | + | 
 | 130 | +error: use of `filter_map` with an identity function  | 
 | 131 | +  --> tests/ui/filter_map_identity.rs:80:37  | 
 | 132 | +   |  | 
 | 133 | +LL |         opaque::<i32>().into_iter().filter_map(|x| x);  | 
 | 134 | +   |                                     ^^^^^^^^^^^^^^^^^ help: try: `flatten()`  | 
 | 135 | + | 
 | 136 | +error: aborting due to 22 previous errors  | 
29 | 137 | 
 
  | 
0 commit comments