@@ -88,58 +88,70 @@ LL ~ let _ = it.next();
8888 |
8989
9090error: unnecessary map of the identity function
91- --> tests/ui/map_identity.rs:91:15
91+ --> tests/ui/map_identity.rs:91:23
92+ |
93+ LL | let _ = subindex.0.map(|n| n).next();
94+ | ^^^^^^^^^^^
95+ |
96+ help: remove the call to `map`
97+ |
98+ LL ~ let mut subindex = (index.by_ref().take(3), 42);
99+ LL ~ let _ = subindex.0.next();
100+ |
101+
102+ error: unnecessary map of the identity function
103+ --> tests/ui/map_identity.rs:97:15
92104 |
93105LL | let _ = it.map(|x| x).next();
94106 | ^^^^^^^^^^^ help: remove the call to `map`
95107
96108error: unnecessary map of the identity function
97- --> tests/ui/map_identity.rs:96 :19
109+ --> tests/ui/map_identity.rs:102 :19
98110 |
99111LL | let _ = { it }.map(|x| x).next();
100112 | ^^^^^^^^^^^ help: remove the call to `map`
101113
102114error: unnecessary map of the identity function
103- --> tests/ui/map_identity.rs:108 :30
115+ --> tests/ui/map_identity.rs:114 :30
104116 |
105117LL | let _ = x.iter().copied().map(|[x, y]| [x, y]);
106118 | ^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
107119
108120error: unnecessary map of the identity function
109- --> tests/ui/map_identity.rs:134 :26
121+ --> tests/ui/map_identity.rs:140 :26
110122 |
111123LL | let _ = x.into_iter().map(|Foo { foo, bar }| Foo { foo, bar });
112124 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
113125
114126error: unnecessary map of the identity function
115- --> tests/ui/map_identity.rs:138 :26
127+ --> tests/ui/map_identity.rs:144 :26
116128 |
117129LL | let _ = x.into_iter().map(|Foo { foo, bar }| foo::Foo { foo, bar });
118130 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
119131
120132error: unnecessary map of the identity function
121- --> tests/ui/map_identity.rs:146 :26
133+ --> tests/ui/map_identity.rs:152 :26
122134 |
123135LL | let _ = x.into_iter().map(|Foo { foo, bar }| Foo { foo: foo, bar: bar });
124136 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
125137
126138error: unnecessary map of the identity function
127- --> tests/ui/map_identity.rs:150 :26
139+ --> tests/ui/map_identity.rs:156 :26
128140 |
129141LL | let _ = x.into_iter().map(|Foo { foo, bar }| Foo { bar, foo });
130142 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
131143
132144error: unnecessary map of the identity function
133- --> tests/ui/map_identity.rs:160 :26
145+ --> tests/ui/map_identity.rs:166 :26
134146 |
135147LL | let _ = x.into_iter().map(|Foo2(foo, bar)| Foo2(foo, bar));
136148 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
137149
138150error: unnecessary map of the identity function
139- --> tests/ui/map_identity.rs:164 :26
151+ --> tests/ui/map_identity.rs:170 :26
140152 |
141153LL | let _ = x.into_iter().map(|Foo2(foo, bar)| foo::Foo2(foo, bar));
142154 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
143155
144- error: aborting due to 21 previous errors
156+ error: aborting due to 22 previous errors
145157
0 commit comments