11error: impl for `HashMap` should be generalized over different hashers
2- --> $DIR/implicit_hasher.rs:16 :35
2+ --> $DIR/implicit_hasher.rs:17 :35
33 |
44LL | impl<K: Hash + Eq, V> Foo<i8> for HashMap<K, V> {
55 | ^^^^^^^^^^^^^
66 |
77note: the lint level is defined here
8- --> $DIR/implicit_hasher.rs:2 :9
8+ --> $DIR/implicit_hasher.rs:3 :9
99 |
1010LL | #![deny(clippy::implicit_hasher)]
1111 | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -19,7 +19,7 @@ LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default:
1919 | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020
2121error: impl for `HashMap` should be generalized over different hashers
22- --> $DIR/implicit_hasher.rs:25 :36
22+ --> $DIR/implicit_hasher.rs:26 :36
2323 |
2424LL | impl<K: Hash + Eq, V> Foo<i8> for (HashMap<K, V>,) {
2525 | ^^^^^^^^^^^^^
@@ -34,7 +34,7 @@ LL | ((HashMap::default(),), (HashMap::with_capacity_and_hasher(10, Defa
3434 | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3535
3636error: impl for `HashMap` should be generalized over different hashers
37- --> $DIR/implicit_hasher.rs:30 :19
37+ --> $DIR/implicit_hasher.rs:31 :19
3838 |
3939LL | impl Foo<i16> for HashMap<String, String> {
4040 | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -49,7 +49,7 @@ LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default:
4949 | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5050
5151error: impl for `HashSet` should be generalized over different hashers
52- --> $DIR/implicit_hasher.rs:47 :32
52+ --> $DIR/implicit_hasher.rs:48 :32
5353 |
5454LL | impl<T: Hash + Eq> Foo<i8> for HashSet<T> {
5555 | ^^^^^^^^^^
@@ -64,7 +64,7 @@ LL | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default:
6464 | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6565
6666error: impl for `HashSet` should be generalized over different hashers
67- --> $DIR/implicit_hasher.rs:52 :19
67+ --> $DIR/implicit_hasher.rs:53 :19
6868 |
6969LL | impl Foo<i16> for HashSet<String> {
7070 | ^^^^^^^^^^^^^^^
@@ -79,7 +79,7 @@ LL | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default:
7979 | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8080
8181error: parameter of type `HashMap` should be generalized over different hashers
82- --> $DIR/implicit_hasher.rs:69 :23
82+ --> $DIR/implicit_hasher.rs:70 :23
8383 |
8484LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
8585 | ^^^^^^^^^^^^^^^^^
@@ -90,7 +90,7 @@ LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _s
9090 | +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~~~
9191
9292error: parameter of type `HashSet` should be generalized over different hashers
93- --> $DIR/implicit_hasher.rs:69 :53
93+ --> $DIR/implicit_hasher.rs:70 :53
9494 |
9595LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
9696 | ^^^^^^^^^^^^
@@ -101,7 +101,7 @@ LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set:
101101 | +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~
102102
103103error: impl for `HashMap` should be generalized over different hashers
104- --> $DIR/implicit_hasher.rs:73 :43
104+ --> $DIR/implicit_hasher.rs:74 :43
105105 |
106106LL | impl<K: Hash + Eq, V> Foo<u8> for HashMap<K, V> {
107107 | ^^^^^^^^^^^^^
@@ -120,7 +120,7 @@ LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10,
120120 | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121121
122122error: parameter of type `HashMap` should be generalized over different hashers
123- --> $DIR/implicit_hasher.rs:81 :33
123+ --> $DIR/implicit_hasher.rs:82 :33
124124 |
125125LL | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
126126 | ^^^^^^^^^^^^^^^^^
@@ -135,7 +135,7 @@ LL | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i
135135 | +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~~~
136136
137137error: parameter of type `HashSet` should be generalized over different hashers
138- --> $DIR/implicit_hasher.rs:81 :63
138+ --> $DIR/implicit_hasher.rs:82 :63
139139 |
140140LL | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
141141 | ^^^^^^^^^^^^
@@ -149,5 +149,16 @@ help: consider adding a type parameter
149149LL | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}
150150 | +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~
151151
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
153164
0 commit comments