]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/iter_kv_map.stderr
Rollup merge of #102110 - CleanCut:migrate_rustc_passes_diagnostics, r=davidtwco
[rust.git] / src / tools / clippy / tests / ui / iter_kv_map.stderr
1 error: iterating on a map's keys
2   --> $DIR/iter_kv_map.rs:15:13
3    |
4 LL |     let _ = map.iter().map(|(key, _)| key).collect::<Vec<_>>();
5    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
6    |
7    = note: `-D clippy::iter-kv-map` implied by `-D warnings`
8
9 error: iterating on a map's values
10   --> $DIR/iter_kv_map.rs:16:13
11    |
12 LL |     let _ = map.iter().map(|(_, value)| value).collect::<Vec<_>>();
13    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values()`
14
15 error: iterating on a map's values
16   --> $DIR/iter_kv_map.rs:17:13
17    |
18 LL |     let _ = map.iter().map(|(_, v)| v + 2).collect::<Vec<_>>();
19    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|v| v + 2)`
20
21 error: iterating on a map's keys
22   --> $DIR/iter_kv_map.rs:19:13
23    |
24 LL |     let _ = map.clone().into_iter().map(|(key, _)| key).collect::<Vec<_>>();
25    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys()`
26
27 error: iterating on a map's keys
28   --> $DIR/iter_kv_map.rs:20:13
29    |
30 LL |     let _ = map.clone().into_iter().map(|(key, _)| key + 2).collect::<Vec<_>>();
31    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys().map(|key| key + 2)`
32
33 error: iterating on a map's values
34   --> $DIR/iter_kv_map.rs:22:13
35    |
36 LL |     let _ = map.clone().into_iter().map(|(_, val)| val).collect::<Vec<_>>();
37    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()`
38
39 error: iterating on a map's values
40   --> $DIR/iter_kv_map.rs:23:13
41    |
42 LL |     let _ = map.clone().into_iter().map(|(_, val)| val + 2).collect::<Vec<_>>();
43    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values().map(|val| val + 2)`
44
45 error: iterating on a map's values
46   --> $DIR/iter_kv_map.rs:25:13
47    |
48 LL |     let _ = map.clone().iter().map(|(_, val)| val).collect::<Vec<_>>();
49    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().values()`
50
51 error: iterating on a map's keys
52   --> $DIR/iter_kv_map.rs:26:13
53    |
54 LL |     let _ = map.iter().map(|(key, _)| key).filter(|x| *x % 2 == 0).count();
55    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
56
57 error: iterating on a map's keys
58   --> $DIR/iter_kv_map.rs:36:13
59    |
60 LL |     let _ = map.iter().map(|(key, _value)| key * 9).count();
61    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys().map(|key| key * 9)`
62
63 error: iterating on a map's values
64   --> $DIR/iter_kv_map.rs:37:13
65    |
66 LL |     let _ = map.iter().map(|(_key, value)| value * 17).count();
67    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|value| value * 17)`
68
69 error: iterating on a map's keys
70   --> $DIR/iter_kv_map.rs:41:13
71    |
72 LL |     let _ = map.iter().map(|(key, _)| key).collect::<Vec<_>>();
73    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
74
75 error: iterating on a map's values
76   --> $DIR/iter_kv_map.rs:42:13
77    |
78 LL |     let _ = map.iter().map(|(_, value)| value).collect::<Vec<_>>();
79    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values()`
80
81 error: iterating on a map's values
82   --> $DIR/iter_kv_map.rs:43:13
83    |
84 LL |     let _ = map.iter().map(|(_, v)| v + 2).collect::<Vec<_>>();
85    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|v| v + 2)`
86
87 error: iterating on a map's keys
88   --> $DIR/iter_kv_map.rs:45:13
89    |
90 LL |     let _ = map.clone().into_iter().map(|(key, _)| key).collect::<Vec<_>>();
91    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys()`
92
93 error: iterating on a map's keys
94   --> $DIR/iter_kv_map.rs:46:13
95    |
96 LL |     let _ = map.clone().into_iter().map(|(key, _)| key + 2).collect::<Vec<_>>();
97    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys().map(|key| key + 2)`
98
99 error: iterating on a map's values
100   --> $DIR/iter_kv_map.rs:48:13
101    |
102 LL |     let _ = map.clone().into_iter().map(|(_, val)| val).collect::<Vec<_>>();
103    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()`
104
105 error: iterating on a map's values
106   --> $DIR/iter_kv_map.rs:49:13
107    |
108 LL |     let _ = map.clone().into_iter().map(|(_, val)| val + 2).collect::<Vec<_>>();
109    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values().map(|val| val + 2)`
110
111 error: iterating on a map's values
112   --> $DIR/iter_kv_map.rs:51:13
113    |
114 LL |     let _ = map.clone().iter().map(|(_, val)| val).collect::<Vec<_>>();
115    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().values()`
116
117 error: iterating on a map's keys
118   --> $DIR/iter_kv_map.rs:52:13
119    |
120 LL |     let _ = map.iter().map(|(key, _)| key).filter(|x| *x % 2 == 0).count();
121    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
122
123 error: iterating on a map's keys
124   --> $DIR/iter_kv_map.rs:62:13
125    |
126 LL |     let _ = map.iter().map(|(key, _value)| key * 9).count();
127    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys().map(|key| key * 9)`
128
129 error: iterating on a map's values
130   --> $DIR/iter_kv_map.rs:63:13
131    |
132 LL |     let _ = map.iter().map(|(_key, value)| value * 17).count();
133    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|value| value * 17)`
134
135 error: aborting due to 22 previous errors
136