1 error: impl for `HashMap` should be generalized over different hashers
2 --> $DIR/implicit_hasher.rs:20:35
4 20 | 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 20 | 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 26 | (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:29:36
20 29 | impl<K: Hash + Eq, V> Foo<i8> for (HashMap<K, V>,) {
22 help: consider adding a type parameter
24 29 | 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 31 | ((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:34:19
34 34 | impl Foo<i16> for HashMap<String, String> {
35 | ^^^^^^^^^^^^^^^^^^^^^^^
36 help: consider adding a type parameter
38 34 | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashMap<String, String, S> {
39 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
40 help: ...and use generic constructor
42 36 | (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:51:32
48 51 | impl<T: Hash + Eq> Foo<i8> for HashSet<T> {
50 help: consider adding a type parameter
52 51 | impl<T: Hash + Eq, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashSet<T, S> {
53 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^
54 help: ...and use generic constructor
56 53 | (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:56:19
62 56 | impl Foo<i16> for HashSet<String> {
64 help: consider adding a type parameter
66 56 | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashSet<String, S> {
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
68 help: ...and use generic constructor
70 58 | (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:73:23
76 73 | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
78 help: consider adding a type parameter
80 73 | 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:73:53
86 73 | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
88 help: consider adding a type parameter
90 73 | 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:77:43
96 77 | impl<K: Hash + Eq, V> Foo<u8> for HashMap<K, V> {
100 | ------------ in this macro invocation
101 help: consider adding a type parameter
103 77 | 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 79 | (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:85:33
113 85 | 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 85 | 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:85:63
126 85 | 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 85 | 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