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

error: iterating on a map's values
  --> $DIR/iter_kv_map.rs:16:13
   |
LL |     let _ = map.iter().map(|(_, value)| value).collect::<Vec<_>>();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values()`

error: iterating on a map's values
  --> $DIR/iter_kv_map.rs:17:13
   |
LL |     let _ = map.iter().map(|(_, v)| v + 2).collect::<Vec<_>>();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|v| v + 2)`

error: iterating on a map's keys
  --> $DIR/iter_kv_map.rs:19:13
   |
LL |     let _ = map.clone().into_iter().map(|(key, _)| key).collect::<Vec<_>>();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys()`

error: iterating on a map's keys
  --> $DIR/iter_kv_map.rs:20:13
   |
LL |     let _ = map.clone().into_iter().map(|(key, _)| key + 2).collect::<Vec<_>>();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys().map(|key| key + 2)`

error: iterating on a map's values
  --> $DIR/iter_kv_map.rs:22:13
   |
LL |     let _ = map.clone().into_iter().map(|(_, val)| val).collect::<Vec<_>>();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()`

error: iterating on a map's values
  --> $DIR/iter_kv_map.rs:23:13
   |
LL |     let _ = map.clone().into_iter().map(|(_, val)| val + 2).collect::<Vec<_>>();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values().map(|val| val + 2)`

error: iterating on a map's values
  --> $DIR/iter_kv_map.rs:25:13
   |
LL |     let _ = map.clone().iter().map(|(_, val)| val).collect::<Vec<_>>();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().values()`

error: iterating on a map's keys
  --> $DIR/iter_kv_map.rs:26:13
   |
LL |     let _ = map.iter().map(|(key, _)| key).filter(|x| *x % 2 == 0).count();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`

error: iterating on a map's keys
  --> $DIR/iter_kv_map.rs:36:13
   |
LL |     let _ = map.iter().map(|(key, _value)| key * 9).count();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys().map(|key| key * 9)`

error: iterating on a map's values
  --> $DIR/iter_kv_map.rs:37:13
   |
LL |     let _ = map.iter().map(|(_key, value)| value * 17).count();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|value| value * 17)`

error: iterating on a map's keys
  --> $DIR/iter_kv_map.rs:41:13
   |
LL |     let _ = map.iter().map(|(key, _)| key).collect::<Vec<_>>();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`

error: iterating on a map's values
  --> $DIR/iter_kv_map.rs:42:13
   |
LL |     let _ = map.iter().map(|(_, value)| value).collect::<Vec<_>>();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values()`

error: iterating on a map's values
  --> $DIR/iter_kv_map.rs:43:13
   |
LL |     let _ = map.iter().map(|(_, v)| v + 2).collect::<Vec<_>>();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|v| v + 2)`

error: iterating on a map's keys
  --> $DIR/iter_kv_map.rs:45:13
   |
LL |     let _ = map.clone().into_iter().map(|(key, _)| key).collect::<Vec<_>>();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys()`

error: iterating on a map's keys
  --> $DIR/iter_kv_map.rs:46:13
   |
LL |     let _ = map.clone().into_iter().map(|(key, _)| key + 2).collect::<Vec<_>>();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys().map(|key| key + 2)`

error: iterating on a map's values
  --> $DIR/iter_kv_map.rs:48:13
   |
LL |     let _ = map.clone().into_iter().map(|(_, val)| val).collect::<Vec<_>>();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()`

error: iterating on a map's values
  --> $DIR/iter_kv_map.rs:49:13
   |
LL |     let _ = map.clone().into_iter().map(|(_, val)| val + 2).collect::<Vec<_>>();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values().map(|val| val + 2)`

error: iterating on a map's values
  --> $DIR/iter_kv_map.rs:51:13
   |
LL |     let _ = map.clone().iter().map(|(_, val)| val).collect::<Vec<_>>();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().values()`

error: iterating on a map's keys
  --> $DIR/iter_kv_map.rs:52:13
   |
LL |     let _ = map.iter().map(|(key, _)| key).filter(|x| *x % 2 == 0).count();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`

error: iterating on a map's keys
  --> $DIR/iter_kv_map.rs:62:13
   |
LL |     let _ = map.iter().map(|(key, _value)| key * 9).count();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys().map(|key| key * 9)`

error: iterating on a map's values
  --> $DIR/iter_kv_map.rs:63:13
   |
LL |     let _ = map.iter().map(|(_key, value)| value * 17).count();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|value| value * 17)`

error: aborting due to 22 previous errors