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
|
error: map with zero-sized value type
--> $DIR/zero_sized_btreemap_values.rs:5:28
|
LL | const CONST_NOT_OK: Option<BTreeMap<String, ()>> = None;
| ^^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
= note: `-D clippy::zero-sized-map-values` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::zero_sized_map_values)]`
error: map with zero-sized value type
--> $DIR/zero_sized_btreemap_values.rs:9:30
|
LL | static STATIC_NOT_OK: Option<BTreeMap<String, ()>> = None;
| ^^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_btreemap_values.rs:13:17
|
LL | type NotOkMap = BTreeMap<String, ()>;
| ^^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_btreemap_values.rs:18:11
|
LL | NotOk(BTreeMap<String, ()>),
| ^^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_btreemap_values.rs:24:13
|
LL | not_ok: BTreeMap<String, ()>,
| ^^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_btreemap_values.rs:26:22
|
LL | also_not_ok: Vec<BTreeMap<usize, ()>>,
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_btreemap_values.rs:35:30
|
LL | fn weird_map(&self, map: BTreeMap<usize, ()>);
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_btreemap_values.rs:44:25
|
LL | fn not_ok(&self) -> BTreeMap<String, ()> {
| ^^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_btreemap_values.rs:62:14
|
LL | fn test(map: BTreeMap<String, ()>, key: &str) -> BTreeMap<String, ()> {
| ^^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_btreemap_values.rs:62:50
|
LL | fn test(map: BTreeMap<String, ()>, key: &str) -> BTreeMap<String, ()> {
| ^^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_btreemap_values.rs:73:35
|
LL | let _: BTreeMap<String, ()> = BTreeMap::new();
| ^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_btreemap_values.rs:73:12
|
LL | let _: BTreeMap<String, ()> = BTreeMap::new();
| ^^^^^^^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: map with zero-sized value type
--> $DIR/zero_sized_btreemap_values.rs:78:12
|
LL | let _: BTreeMap<_, _> = std::iter::empty::<(String, ())>().collect();
| ^^^^^^^^^^^^^^
|
= help: consider using a set instead
error: aborting due to 13 previous errors
|