|
1 | 1 | error: map with zero-sized value type
|
2 |
| - --> $DIR/zero_sized_map_values.rs:6:13 |
| 2 | + --> $DIR/zero_sized_map_values.rs:5:28 |
| 3 | + | |
| 4 | +LL | const CONST_NOT_OK: Option<HashMap<String, ()>> = None; |
| 5 | + | ^^^^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | + = note: `-D clippy::zero-sized-map-values` implied by `-D warnings` |
| 8 | + = help: consider using a set instead |
| 9 | + |
| 10 | +error: map with zero-sized value type |
| 11 | + --> $DIR/zero_sized_map_values.rs:8:30 |
| 12 | + | |
| 13 | +LL | static STATIC_NOT_OK: Option<HashMap<String, ()>> = None; |
| 14 | + | ^^^^^^^^^^^^^^^^^^^ |
| 15 | + | |
| 16 | + = help: consider using a set instead |
| 17 | + |
| 18 | +error: map with zero-sized value type |
| 19 | + --> $DIR/zero_sized_map_values.rs:11:17 |
| 20 | + | |
| 21 | +LL | type NotOkMap = HashMap<String, ()>; |
| 22 | + | ^^^^^^^^^^^^^^^^^^^ |
| 23 | + | |
| 24 | + = help: consider using a set instead |
| 25 | + |
| 26 | +error: map with zero-sized value type |
| 27 | + --> $DIR/zero_sized_map_values.rs:15:11 |
| 28 | + | |
| 29 | +LL | NotOk(HashMap<String, ()>), |
| 30 | + | ^^^^^^^^^^^^^^^^^^^ |
| 31 | + | |
| 32 | + = help: consider using a set instead |
| 33 | + |
| 34 | +error: map with zero-sized value type |
| 35 | + --> $DIR/zero_sized_map_values.rs:20:13 |
3 | 36 | |
|
4 | 37 | LL | not_ok: HashMap<String, ()>,
|
5 | 38 | | ^^^^^^^^^^^^^^^^^^^
|
6 | 39 | |
|
7 |
| - = note: `-D clippy::zero-sized-map-values` implied by `-D warnings` |
8 | 40 | = help: consider using a set instead
|
9 | 41 |
|
10 | 42 | error: map with zero-sized value type
|
11 |
| - --> $DIR/zero_sized_map_values.rs:8:22 |
| 43 | + --> $DIR/zero_sized_map_values.rs:22:22 |
12 | 44 | |
|
13 | 45 | LL | also_not_ok: Vec<HashMap<usize, ()>>,
|
14 | 46 | | ^^^^^^^^^^^^^^^^^^
|
15 | 47 | |
|
16 | 48 | = help: consider using a set instead
|
17 | 49 |
|
18 | 50 | error: map with zero-sized value type
|
19 |
| - --> $DIR/zero_sized_map_values.rs:16:30 |
| 51 | + --> $DIR/zero_sized_map_values.rs:30:30 |
20 | 52 | |
|
21 | 53 | LL | fn weird_map(&self, map: HashMap<usize, ()>);
|
22 | 54 | | ^^^^^^^^^^^^^^^^^^
|
23 | 55 | |
|
24 | 56 | = help: consider using a set instead
|
25 | 57 |
|
26 | 58 | error: map with zero-sized value type
|
27 |
| - --> $DIR/zero_sized_map_values.rs:31:14 |
| 59 | + --> $DIR/zero_sized_map_values.rs:38:25 |
| 60 | + | |
| 61 | +LL | fn not_ok(&self) -> HashMap<String, ()> { |
| 62 | + | ^^^^^^^^^^^^^^^^^^^ |
| 63 | + | |
| 64 | + = help: consider using a set instead |
| 65 | + |
| 66 | +error: map with zero-sized value type |
| 67 | + --> $DIR/zero_sized_map_values.rs:55:14 |
28 | 68 | |
|
29 | 69 | LL | fn test(map: HashMap<String, ()>, key: &str) -> HashMap<String, ()> {
|
30 | 70 | | ^^^^^^^^^^^^^^^^^^^
|
31 | 71 | |
|
32 | 72 | = help: consider using a set instead
|
33 | 73 |
|
34 | 74 | error: map with zero-sized value type
|
35 |
| - --> $DIR/zero_sized_map_values.rs:31:49 |
| 75 | + --> $DIR/zero_sized_map_values.rs:55:49 |
36 | 76 | |
|
37 | 77 | LL | fn test(map: HashMap<String, ()>, key: &str) -> HashMap<String, ()> {
|
38 | 78 | | ^^^^^^^^^^^^^^^^^^^
|
39 | 79 | |
|
40 | 80 | = help: consider using a set instead
|
41 | 81 |
|
42 | 82 | error: map with zero-sized value type
|
43 |
| - --> $DIR/zero_sized_map_values.rs:41:9 |
| 83 | + --> $DIR/zero_sized_map_values.rs:65:9 |
44 | 84 | |
|
45 | 85 | LL | let _: HashMap<String, ()> = HashMap::new();
|
46 | 86 | | ^
|
47 | 87 | |
|
48 | 88 | = help: consider using a set instead
|
49 | 89 |
|
50 | 90 | error: map with zero-sized value type
|
51 |
| - --> $DIR/zero_sized_map_values.rs:44:9 |
| 91 | + --> $DIR/zero_sized_map_values.rs:65:12 |
| 92 | + | |
| 93 | +LL | let _: HashMap<String, ()> = HashMap::new(); |
| 94 | + | ^^^^^^^^^^^^^^^^^^^ |
| 95 | + | |
| 96 | + = help: consider using a set instead |
| 97 | + |
| 98 | +error: map with zero-sized value type |
| 99 | + --> $DIR/zero_sized_map_values.rs:68:9 |
52 | 100 | |
|
53 | 101 | LL | let _: HashMap<_, _> = std::iter::empty::<(String, ())>().collect();
|
54 | 102 | | ^
|
55 | 103 | |
|
56 | 104 | = help: consider using a set instead
|
57 | 105 |
|
58 |
| -error: aborting due to 7 previous errors |
| 106 | +error: aborting due to 13 previous errors |
59 | 107 |
|
0 commit comments