1 error: impl for `HashMap` should be generarized 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 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> {
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 help: ...and change the type to
14 11 | impl<K: Hash + Eq, V> Foo<i8> for HashMap<K, V, S> {
16 help: ...and use generic constructor here
18 14 | let _: HashMap<i32, i32> = HashMap::default();
20 help: ...and use generic constructor here
22 15 | let _: HashSet<i32> = HashSet::default();
24 help: ...and use generic constructor here
26 17 | (HashMap::default(), HashMap::with_capacity(10))
28 help: ...and use generic constructor here
30 17 | (HashMap::new(), HashMap::with_capacity_and_hasher(10, Default::default()))
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33 error: impl for `HashMap` should be generarized over different hashers
34 --> $DIR/implicit_hasher.rs:20:36
36 20 | impl<K: Hash + Eq, V> Foo<i8> for (HashMap<K, V>,) {
39 help: consider adding a type parameter
41 20 | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<i8> for (HashMap<K, V>,) {
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43 help: ...and change the type to
45 20 | impl<K: Hash + Eq, V> Foo<i8> for (HashMap<K, V, S>,) {
47 help: ...and use generic constructor here
49 22 | ((HashMap::default(),), (HashMap::with_capacity(10),))
51 help: ...and use generic constructor here
53 22 | ((HashMap::new(),), (HashMap::with_capacity_and_hasher(10, Default::default()),))
54 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56 error: impl for `HashMap` should be generarized over different hashers
57 --> $DIR/implicit_hasher.rs:25:19
59 25 | impl Foo<i16> for HashMap<String, String> {
60 | ^^^^^^^^^^^^^^^^^^^^^^^
62 help: consider adding a type parameter
64 25 | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashMap<String, String> {
65 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66 help: ...and change the type to
68 25 | impl Foo<i16> for HashMap<String, String, S> {
69 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
70 help: ...and use generic constructor here
72 27 | (HashMap::default(), HashMap::with_capacity(10))
74 help: ...and use generic constructor here
76 27 | (HashMap::new(), HashMap::with_capacity_and_hasher(10, Default::default()))
77 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79 error: impl for `HashSet` should be generarized over different hashers
80 --> $DIR/implicit_hasher.rs:43:32
82 43 | impl<T: Hash + Eq> Foo<i8> for HashSet<T> {
85 help: consider adding a type parameter
87 43 | impl<T: Hash + Eq, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashSet<T> {
88 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
89 help: ...and change the type to
91 43 | impl<T: Hash + Eq> Foo<i8> for HashSet<T, S> {
93 help: ...and use generic constructor here
95 45 | (HashSet::default(), HashSet::with_capacity(10))
97 help: ...and use generic constructor here
99 45 | (HashSet::new(), HashSet::with_capacity_and_hasher(10, Default::default()))
100 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102 error: impl for `HashSet` should be generarized over different hashers
103 --> $DIR/implicit_hasher.rs:48:19
105 48 | impl Foo<i16> for HashSet<String> {
108 help: consider adding a type parameter
110 48 | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashSet<String> {
111 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112 help: ...and change the type to
114 48 | impl Foo<i16> for HashSet<String, S> {
116 help: ...and use generic constructor here
118 50 | (HashSet::default(), HashSet::with_capacity(10))
120 help: ...and use generic constructor here
122 50 | (HashSet::new(), HashSet::with_capacity_and_hasher(10, Default::default()))
123 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
125 error: parameter of type `HashMap` should be generarized over different hashers
126 --> $DIR/implicit_hasher.rs:65:23
128 65 | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {
131 help: consider adding a type parameter
133 65 | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {
134 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
135 help: ...and change the type to
137 65 | pub fn foo(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {
138 | ^^^^^^^^^^^^^^^^^^^^
140 error: parameter of type `HashSet` should be generarized over different hashers
141 --> $DIR/implicit_hasher.rs:65:53
143 65 | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {
146 help: consider adding a type parameter
148 65 | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {
149 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
150 help: ...and change the type to
152 65 | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {