@@ -201,5 +201,65 @@ error: iterating on a map's values
201201LL | let _ = map.clone().into_iter().map(|(_, mut val)| val).count();
202202 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()`
203203
204- error: aborting due to 28 previous errors
204+ error: iterating on a map's keys
205+ --> $DIR/iter_kv_map.rs:109:13
206+ |
207+ LL | let _ = map.iter().map(|(key, _)| key).collect::<Vec<_>>();
208+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
209+
210+ error: iterating on a map's values
211+ --> $DIR/iter_kv_map.rs:111:13
212+ |
213+ LL | let _ = map.iter().map(|(_, value)| value).collect::<Vec<_>>();
214+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values()`
215+
216+ error: iterating on a map's values
217+ --> $DIR/iter_kv_map.rs:113:13
218+ |
219+ LL | let _ = map.iter().map(|(_, v)| v + 2).collect::<Vec<_>>();
220+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|v| v + 2)`
221+
222+ error: iterating on a map's keys
223+ --> $DIR/iter_kv_map.rs:122:13
224+ |
225+ LL | let _ = map.clone().into_iter().map(|(key, _)| key).collect::<Vec<_>>();
226+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys()`
227+
228+ error: iterating on a map's keys
229+ --> $DIR/iter_kv_map.rs:124:13
230+ |
231+ LL | let _ = map.clone().into_iter().map(|(key, _)| key + 2).collect::<Vec<_>>();
232+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys().map(|key| key + 2)`
233+
234+ error: iterating on a map's values
235+ --> $DIR/iter_kv_map.rs:127:13
236+ |
237+ LL | let _ = map.clone().into_iter().map(|(_, val)| val).collect::<Vec<_>>();
238+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()`
239+
240+ error: iterating on a map's values
241+ --> $DIR/iter_kv_map.rs:129:13
242+ |
243+ LL | let _ = map.clone().into_iter().map(|(_, val)| val + 2).collect::<Vec<_>>();
244+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values().map(|val| val + 2)`
245+
246+ error: iterating on a map's keys
247+ --> $DIR/iter_kv_map.rs:132:13
248+ |
249+ LL | let _ = map.iter().map(|(key, _)| key).collect::<Vec<_>>();
250+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
251+
252+ error: iterating on a map's values
253+ --> $DIR/iter_kv_map.rs:134:13
254+ |
255+ LL | let _ = map.iter().map(|(_, value)| value).collect::<Vec<_>>();
256+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values()`
257+
258+ error: iterating on a map's values
259+ --> $DIR/iter_kv_map.rs:136:13
260+ |
261+ LL | let _ = map.iter().map(|(_, v)| v + 2).collect::<Vec<_>>();
262+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|v| v + 2)`
263+
264+ error: aborting due to 38 previous errors
205265
0 commit comments