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