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>,) {
23 help: consider adding a type parameter
25 LL | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<i8> for (HashMap<K, V, S>,) {
26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
27 help: ...and use generic constructor
29 LL | ((HashMap::default(),), (HashMap::with_capacity_and_hasher(10, Default::default()),))
30 | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32 error: impl for `HashMap` should be generalized over different hashers
33 --> $DIR/implicit_hasher.rs:29:19
35 LL | impl Foo<i16> for HashMap<String, String> {
36 | ^^^^^^^^^^^^^^^^^^^^^^^
38 help: consider adding a type parameter
40 LL | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashMap<String, String, S> {
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
42 help: ...and use generic constructor
44 LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
45 | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47 error: impl for `HashSet` should be generalized over different hashers
48 --> $DIR/implicit_hasher.rs:46:32
50 LL | impl<T: Hash + Eq> Foo<i8> for HashSet<T> {
53 help: consider adding a type parameter
55 LL | impl<T: Hash + Eq, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashSet<T, S> {
56 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^
57 help: ...and use generic constructor
59 LL | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
60 | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
62 error: impl for `HashSet` should be generalized over different hashers
63 --> $DIR/implicit_hasher.rs:51:19
65 LL | impl Foo<i16> for HashSet<String> {
68 help: consider adding a type parameter
70 LL | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashSet<String, S> {
71 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
72 help: ...and use generic constructor
74 LL | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
75 | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
77 error: parameter of type `HashMap` should be generalized over different hashers
78 --> $DIR/implicit_hasher.rs:68:23
80 LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
83 help: consider adding a type parameter
85 LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {}
86 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^
88 error: parameter of type `HashSet` should be generalized over different hashers
89 --> $DIR/implicit_hasher.rs:68:53
91 LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
94 help: consider adding a type parameter
96 LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}
97 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
99 error: impl for `HashMap` should be generalized over different hashers
100 --> $DIR/implicit_hasher.rs:72:43
102 LL | impl<K: Hash + Eq, V> Foo<u8> for HashMap<K, V> {
106 | ----------- in this macro invocation
108 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
109 help: consider adding a type parameter
111 LL | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<u8> for HashMap<K, V, S> {
112 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
113 help: ...and use generic constructor
115 LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
116 | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
118 error: parameter of type `HashMap` should be generalized over different hashers
119 --> $DIR/implicit_hasher.rs:80:33
121 LL | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
125 | ------------- in this macro invocation
127 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
128 help: consider adding a type parameter
130 LL | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {}
131 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^
133 error: parameter of type `HashSet` should be generalized over different hashers
134 --> $DIR/implicit_hasher.rs:80:63
136 LL | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
140 | ------------- in this macro invocation
142 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
143 help: consider adding a type parameter
145 LL | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}
146 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
148 error: aborting due to 10 previous errors