1 error: impl for `HashMap` should be generalized over different hashers
2 --> $DIR/implicit_hasher.rs:16:35
4 LL | impl<K: Hash + Eq, V> Foo<i8> for HashMap<K, V> {
7 note: the lint level is defined here
8 --> $DIR/implicit_hasher.rs:2:9
10 LL | #![deny(clippy::implicit_hasher)]
11 | ^^^^^^^^^^^^^^^^^^^^^^^
12 help: consider adding a type parameter
14 LL | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashMap<K, V, S> {
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
16 help: ...and use generic constructor
18 LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
19 | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21 error: impl for `HashMap` should be generalized over different hashers
22 --> $DIR/implicit_hasher.rs:25:36
24 LL | impl<K: Hash + Eq, V> Foo<i8> for (HashMap<K, V>,) {
27 help: consider adding a type parameter
29 LL | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<i8> for (HashMap<K, V, S>,) {
30 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
31 help: ...and use generic constructor
33 LL | ((HashMap::default(),), (HashMap::with_capacity_and_hasher(10, Default::default()),))
34 | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36 error: impl for `HashMap` should be generalized over different hashers
37 --> $DIR/implicit_hasher.rs:30:19
39 LL | impl Foo<i16> for HashMap<String, String> {
40 | ^^^^^^^^^^^^^^^^^^^^^^^
42 help: consider adding a type parameter
44 LL | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashMap<String, String, S> {
45 | +++++++++++++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~~~~~~~~~
46 help: ...and use generic constructor
48 LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
49 | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
51 error: impl for `HashSet` should be generalized over different hashers
52 --> $DIR/implicit_hasher.rs:47:32
54 LL | impl<T: Hash + Eq> Foo<i8> for HashSet<T> {
57 help: consider adding a type parameter
59 LL | impl<T: Hash + Eq, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashSet<T, S> {
60 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~
61 help: ...and use generic constructor
63 LL | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
64 | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66 error: impl for `HashSet` should be generalized over different hashers
67 --> $DIR/implicit_hasher.rs:52:19
69 LL | impl Foo<i16> for HashSet<String> {
72 help: consider adding a type parameter
74 LL | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashSet<String, S> {
75 | +++++++++++++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~
76 help: ...and use generic constructor
78 LL | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
79 | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
81 error: parameter of type `HashMap` should be generalized over different hashers
82 --> $DIR/implicit_hasher.rs:69:23
84 LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
87 help: consider adding a type parameter
89 LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {}
90 | +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~~~
92 error: parameter of type `HashSet` should be generalized over different hashers
93 --> $DIR/implicit_hasher.rs:69:53
95 LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
98 help: consider adding a type parameter
100 LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}
101 | +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~
103 error: impl for `HashMap` should be generalized over different hashers
104 --> $DIR/implicit_hasher.rs:73:43
106 LL | impl<K: Hash + Eq, V> Foo<u8> for HashMap<K, V> {
110 | ---------- in this macro invocation
112 = note: this error originates in the macro `gen` (in Nightly builds, run with -Z macro-backtrace for more info)
113 help: consider adding a type parameter
115 LL | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<u8> for HashMap<K, V, S> {
116 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
117 help: ...and use generic constructor
119 LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
120 | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
122 error: parameter of type `HashMap` should be generalized over different hashers
123 --> $DIR/implicit_hasher.rs:81:33
125 LL | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
129 | ------------ in this macro invocation
131 = note: this error originates in the macro `gen` (in Nightly builds, run with -Z macro-backtrace for more info)
132 help: consider adding a type parameter
134 LL | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {}
135 | +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~~~
137 error: parameter of type `HashSet` should be generalized over different hashers
138 --> $DIR/implicit_hasher.rs:81:63
140 LL | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
144 | ------------ in this macro invocation
146 = note: this error originates in the macro `gen` (in Nightly builds, run with -Z macro-backtrace for more info)
147 help: consider adding a type parameter
149 LL | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}
150 | +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~
152 error: parameter of type `HashMap` should be generalized over different hashers
153 --> $DIR/implicit_hasher.rs:100:35
155 LL | pub async fn election_vote(_data: HashMap<i32, i32>) {}
158 help: consider adding a type parameter
160 LL | pub async fn election_vote<S: ::std::hash::BuildHasher>(_data: HashMap<i32, i32, S>) {}
161 | +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~~~
163 error: aborting due to 11 previous errors