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
|
error: map with zero-sized value type
--> $DIR/zero_sized_hashmap_values.rs:5:28
|
LL | const CONST_NOT_OK: Option<HashMap<String, ()>> = None;
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
= note: `-D clippy::zero-sized-map-values` implied by `-D warnings`
error: map with zero-sized value type
--> $DIR/zero_sized_hashmap_values.rs:8:30
|
LL | static STATIC_NOT_OK: Option<HashMap<String, ()>> = None;
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_hashmap_values.rs:11:17
|
LL | type NotOkMap = HashMap<String, ()>;
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_hashmap_values.rs:15:11
|
LL | NotOk(HashMap<String, ()>),
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_hashmap_values.rs:20:13
|
LL | not_ok: HashMap<String, ()>,
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_hashmap_values.rs:22:22
|
LL | also_not_ok: Vec<HashMap<usize, ()>>,
| ^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_hashmap_values.rs:30:30
|
LL | fn weird_map(&self, map: HashMap<usize, ()>);
| ^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_hashmap_values.rs:38:25
|
LL | fn not_ok(&self) -> HashMap<String, ()> {
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_hashmap_values.rs:55:14
|
LL | fn test(map: HashMap<String, ()>, key: &str) -> HashMap<String, ()> {
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_hashmap_values.rs:55:49
|
LL | fn test(map: HashMap<String, ()>, key: &str) -> HashMap<String, ()> {
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_hashmap_values.rs:64:34
|
LL | let _: HashMap<String, ()> = HashMap::new();
| ^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_hashmap_values.rs:64:12
|
LL | let _: HashMap<String, ()> = HashMap::new();
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_hashmap_values.rs:67:12
|
LL | let _: HashMap<_, _> = std::iter::empty::<(String, ())>().collect();
| ^^^^^^^^^^^^^
|
= help: consider using a set instead
error: aborting due to 13 previous errors
|