1 error: impl for `HashMap` should be generalized over different hashers
2 --> $DIR/implicit_hasher.rs:15:35
4 LL | impl<K: Hash + Eq, V> Foo<i8> for HashMap<K, V> {
7 = note: `-D clippy::implicit-hasher` implied by `-D warnings`
8 help: consider adding a type parameter
10 LL | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashMap<K, V, S> {
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
12 help: ...and use generic constructor
14 LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
15 | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17 error: impl for `HashMap` should be generalized over different hashers
18 --> $DIR/implicit_hasher.rs:24:36
20 LL | impl<K: Hash + Eq, V> Foo<i8> for (HashMap<K, V>,) {
22 help: consider adding a type parameter
24 LL | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<i8> for (HashMap<K, V, S>,) {
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
26 help: ...and use generic constructor
28 LL | ((HashMap::default(),), (HashMap::with_capacity_and_hasher(10, Default::default()),))
29 | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31 error: impl for `HashMap` should be generalized over different hashers
32 --> $DIR/implicit_hasher.rs:29:19
34 LL | impl Foo<i16> for HashMap<String, String> {
35 | ^^^^^^^^^^^^^^^^^^^^^^^
36 help: consider adding a type parameter
38 LL | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashMap<String, String, S> {
39 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
40 help: ...and use generic constructor
42 LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
43 | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45 error: impl for `HashSet` should be generalized over different hashers
46 --> $DIR/implicit_hasher.rs:46:32
48 LL | impl<T: Hash + Eq> Foo<i8> for HashSet<T> {
50 help: consider adding a type parameter
52 LL | impl<T: Hash + Eq, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashSet<T, S> {
53 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^
54 help: ...and use generic constructor
56 LL | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
57 | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59 error: impl for `HashSet` should be generalized over different hashers
60 --> $DIR/implicit_hasher.rs:51:19
62 LL | impl Foo<i16> for HashSet<String> {
64 help: consider adding a type parameter
66 LL | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashSet<String, S> {
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
68 help: ...and use generic constructor
70 LL | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
71 | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73 error: parameter of type `HashMap` should be generalized over different hashers
74 --> $DIR/implicit_hasher.rs:68:23
76 LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
78 help: consider adding a type parameter
80 LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {}
81 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^
83 error: parameter of type `HashSet` should be generalized over different hashers
84 --> $DIR/implicit_hasher.rs:68:53
86 LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
88 help: consider adding a type parameter
90 LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}
91 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
93 error: impl for `HashMap` should be generalized over different hashers
94 --> $DIR/implicit_hasher.rs:72:43
96 LL | impl<K: Hash + Eq, V> Foo<u8> for HashMap<K, V> {
100 | ----------- in this macro invocation
101 help: consider adding a type parameter
103 LL | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<u8> for HashMap<K, V, S> {
104 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
105 help: ...and use generic constructor
107 LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
108 | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
110 error: parameter of type `HashMap` should be generalized over different hashers
111 --> $DIR/implicit_hasher.rs:80:33
113 LL | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
117 | ------------- in this macro invocation
118 help: consider adding a type parameter
120 LL | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {}
121 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^
123 error: parameter of type `HashSet` should be generalized over different hashers
124 --> $DIR/implicit_hasher.rs:80:63
126 LL | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
130 | ------------- in this macro invocation
131 help: consider adding a type parameter
133 LL | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}
134 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
136 error: aborting due to 10 previous errors