@@ -76,58 +76,70 @@ LL | let _ = x.iter().copied().map(|(x, y)| (x, y));
7676 | ^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
7777
7878error: unnecessary map of the identity function
79- --> tests/ui/map_identity.rs:88:15
79+ --> tests/ui/map_identity.rs:85:15
80+ |
81+ LL | let _ = it.map(|x| x).next();
82+ | ^^^^^^^^^^^
83+ |
84+ help: remove the call to `map`
85+ |
86+ LL ~ let mut it = [1, 2, 3].into_iter();
87+ LL ~ let _ = it.next();
88+ |
89+
90+ error: unnecessary map of the identity function
91+ --> tests/ui/map_identity.rs:91:15
8092 |
8193LL | let _ = it.map(|x| x).next();
8294 | ^^^^^^^^^^^ help: remove the call to `map`
8395
8496error: unnecessary map of the identity function
85- --> tests/ui/map_identity.rs:93 :19
97+ --> tests/ui/map_identity.rs:96 :19
8698 |
8799LL | let _ = { it }.map(|x| x).next();
88100 | ^^^^^^^^^^^ help: remove the call to `map`
89101
90102error: unnecessary map of the identity function
91- --> tests/ui/map_identity.rs:105 :30
103+ --> tests/ui/map_identity.rs:108 :30
92104 |
93105LL | let _ = x.iter().copied().map(|[x, y]| [x, y]);
94106 | ^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
95107
96108error: unnecessary map of the identity function
97- --> tests/ui/map_identity.rs:131 :26
109+ --> tests/ui/map_identity.rs:134 :26
98110 |
99111LL | let _ = x.into_iter().map(|Foo { foo, bar }| Foo { foo, bar });
100112 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
101113
102114error: unnecessary map of the identity function
103- --> tests/ui/map_identity.rs:135 :26
115+ --> tests/ui/map_identity.rs:138 :26
104116 |
105117LL | let _ = x.into_iter().map(|Foo { foo, bar }| foo::Foo { foo, bar });
106118 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
107119
108120error: unnecessary map of the identity function
109- --> tests/ui/map_identity.rs:143 :26
121+ --> tests/ui/map_identity.rs:146 :26
110122 |
111123LL | let _ = x.into_iter().map(|Foo { foo, bar }| Foo { foo: foo, bar: bar });
112124 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
113125
114126error: unnecessary map of the identity function
115- --> tests/ui/map_identity.rs:147 :26
127+ --> tests/ui/map_identity.rs:150 :26
116128 |
117129LL | let _ = x.into_iter().map(|Foo { foo, bar }| Foo { bar, foo });
118130 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
119131
120132error: unnecessary map of the identity function
121- --> tests/ui/map_identity.rs:157 :26
133+ --> tests/ui/map_identity.rs:160 :26
122134 |
123135LL | let _ = x.into_iter().map(|Foo2(foo, bar)| Foo2(foo, bar));
124136 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
125137
126138error: unnecessary map of the identity function
127- --> tests/ui/map_identity.rs:161 :26
139+ --> tests/ui/map_identity.rs:164 :26
128140 |
129141LL | let _ = x.into_iter().map(|Foo2(foo, bar)| foo::Foo2(foo, bar));
130142 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
131143
132- error: aborting due to 20 previous errors
144+ error: aborting due to 21 previous errors
133145
0 commit comments