1
1
error: impl for `HashMap` should be generalized over different hashers
2
- --> $DIR/implicit_hasher.rs:16 :35
2
+ --> $DIR/implicit_hasher.rs:17 :35
3
3
|
4
4
LL | impl<K: Hash + Eq, V> Foo<i8> for HashMap<K, V> {
5
5
| ^^^^^^^^^^^^^
6
6
|
7
7
note: the lint level is defined here
8
- --> $DIR/implicit_hasher.rs:2 :9
8
+ --> $DIR/implicit_hasher.rs:3 :9
9
9
|
10
10
LL | #![deny(clippy::implicit_hasher)]
11
11
| ^^^^^^^^^^^^^^^^^^^^^^^
@@ -19,7 +19,7 @@ LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default:
19
19
| ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20
20
21
21
error: impl for `HashMap` should be generalized over different hashers
22
- --> $DIR/implicit_hasher.rs:25 :36
22
+ --> $DIR/implicit_hasher.rs:26 :36
23
23
|
24
24
LL | impl<K: Hash + Eq, V> Foo<i8> for (HashMap<K, V>,) {
25
25
| ^^^^^^^^^^^^^
@@ -34,7 +34,7 @@ LL | ((HashMap::default(),), (HashMap::with_capacity_and_hasher(10, Defa
34
34
| ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35
35
36
36
error: impl for `HashMap` should be generalized over different hashers
37
- --> $DIR/implicit_hasher.rs:30 :19
37
+ --> $DIR/implicit_hasher.rs:31 :19
38
38
|
39
39
LL | impl Foo<i16> for HashMap<String, String> {
40
40
| ^^^^^^^^^^^^^^^^^^^^^^^
@@ -49,7 +49,7 @@ LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default:
49
49
| ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50
50
51
51
error: impl for `HashSet` should be generalized over different hashers
52
- --> $DIR/implicit_hasher.rs:47 :32
52
+ --> $DIR/implicit_hasher.rs:48 :32
53
53
|
54
54
LL | impl<T: Hash + Eq> Foo<i8> for HashSet<T> {
55
55
| ^^^^^^^^^^
@@ -64,7 +64,7 @@ LL | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default:
64
64
| ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65
65
66
66
error: impl for `HashSet` should be generalized over different hashers
67
- --> $DIR/implicit_hasher.rs:52 :19
67
+ --> $DIR/implicit_hasher.rs:53 :19
68
68
|
69
69
LL | impl Foo<i16> for HashSet<String> {
70
70
| ^^^^^^^^^^^^^^^
@@ -79,7 +79,7 @@ LL | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default:
79
79
| ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80
80
81
81
error: parameter of type `HashMap` should be generalized over different hashers
82
- --> $DIR/implicit_hasher.rs:69 :23
82
+ --> $DIR/implicit_hasher.rs:70 :23
83
83
|
84
84
LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
85
85
| ^^^^^^^^^^^^^^^^^
@@ -90,7 +90,7 @@ LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _s
90
90
| +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~~~
91
91
92
92
error: parameter of type `HashSet` should be generalized over different hashers
93
- --> $DIR/implicit_hasher.rs:69 :53
93
+ --> $DIR/implicit_hasher.rs:70 :53
94
94
|
95
95
LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
96
96
| ^^^^^^^^^^^^
@@ -101,7 +101,7 @@ LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set:
101
101
| +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~
102
102
103
103
error: impl for `HashMap` should be generalized over different hashers
104
- --> $DIR/implicit_hasher.rs:73 :43
104
+ --> $DIR/implicit_hasher.rs:74 :43
105
105
|
106
106
LL | impl<K: Hash + Eq, V> Foo<u8> for HashMap<K, V> {
107
107
| ^^^^^^^^^^^^^
@@ -120,7 +120,7 @@ LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10,
120
120
| ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121
121
122
122
error: parameter of type `HashMap` should be generalized over different hashers
123
- --> $DIR/implicit_hasher.rs:81 :33
123
+ --> $DIR/implicit_hasher.rs:82 :33
124
124
|
125
125
LL | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
126
126
| ^^^^^^^^^^^^^^^^^
@@ -135,7 +135,7 @@ LL | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i
135
135
| +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~~~
136
136
137
137
error: parameter of type `HashSet` should be generalized over different hashers
138
- --> $DIR/implicit_hasher.rs:81 :63
138
+ --> $DIR/implicit_hasher.rs:82 :63
139
139
|
140
140
LL | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
141
141
| ^^^^^^^^^^^^
@@ -149,5 +149,16 @@ help: consider adding a type parameter
149
149
LL | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}
150
150
| +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~
151
151
152
- error: aborting due to 10 previous errors
152
+ error: parameter of type `HashMap` should be generalized over different hashers
153
+ --> $DIR/implicit_hasher.rs:101:35
154
+ |
155
+ LL | pub async fn election_vote(_data: HashMap<i32, i32>) {}
156
+ | ^^^^^^^^^^^^^^^^^
157
+ |
158
+ help: consider adding a type parameter
159
+ |
160
+ LL | pub async fn election_vote<S: ::std::hash::BuildHasher>(_data: HashMap<i32, i32, S>) {}
161
+ | +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~~~
162
+
163
+ error: aborting due to 11 previous errors
153
164
0 commit comments