@@ -7,12 +7,16 @@ error: impl for `HashMap` should be generarized over different hashers
7
7
= note: `-D implicit-hasher` implied by `-D warnings`
8
8
help: consider adding a type parameter
9
9
|
10
- 11 | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher> Foo<i8> for HashMap<K, V> {
11
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10
+ 11 | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default > Foo<i8> for HashMap<K, V> {
11
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12
12
help: ...and change the type to
13
13
|
14
14
11 | impl<K: Hash + Eq, V> Foo<i8> for HashMap<K, V, S> {
15
15
| ^^^^^^^^^^^^^^^^
16
+ help: ...and use generic constructor
17
+ |
18
+ 17 | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
19
+ | ^^^^^^^^^^^^^^^^^^
16
20
17
21
error: impl for `HashMap` should be generarized over different hashers
18
22
--> $DIR/implicit_hasher.rs:20:36
@@ -22,12 +26,16 @@ error: impl for `HashMap` should be generarized over different hashers
22
26
|
23
27
help: consider adding a type parameter
24
28
|
25
- 20 | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher> Foo<i8> for (HashMap<K, V>,) {
26
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29
+ 20 | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default > Foo<i8> for (HashMap<K, V>,) {
30
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27
31
help: ...and change the type to
28
32
|
29
33
20 | impl<K: Hash + Eq, V> Foo<i8> for (HashMap<K, V, S>,) {
30
34
| ^^^^^^^^^^^^^^^^
35
+ help: ...and use generic constructor
36
+ |
37
+ 22 | ((HashMap::default(),), (HashMap::with_capacity_and_hasher(10, Default::default()),))
38
+ | ^^^^^^^^^^^^^^^^^^
31
39
32
40
error: impl for `HashMap` should be generarized over different hashers
33
41
--> $DIR/implicit_hasher.rs:25:19
@@ -37,12 +45,16 @@ error: impl for `HashMap` should be generarized over different hashers
37
45
|
38
46
help: consider adding a type parameter
39
47
|
40
- 25 | impl<S: ::std::hash::BuildHasher> Foo<i16> for HashMap<String, String> {
41
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48
+ 25 | impl<S: ::std::hash::BuildHasher + Default > Foo<i16> for HashMap<String, String> {
49
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42
50
help: ...and change the type to
43
51
|
44
52
25 | impl Foo<i16> for HashMap<String, String, S> {
45
53
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
54
+ help: ...and use generic constructor
55
+ |
56
+ 27 | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
57
+ | ^^^^^^^^^^^^^^^^^^
46
58
47
59
error: impl for `HashSet` should be generarized over different hashers
48
60
--> $DIR/implicit_hasher.rs:43:32
@@ -52,12 +64,16 @@ error: impl for `HashSet` should be generarized over different hashers
52
64
|
53
65
help: consider adding a type parameter
54
66
|
55
- 43 | impl<T: Hash + Eq, S: ::std::hash::BuildHasher> Foo<i8> for HashSet<T> {
56
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
67
+ 43 | impl<T: Hash + Eq, S: ::std::hash::BuildHasher + Default > Foo<i8> for HashSet<T> {
68
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
57
69
help: ...and change the type to
58
70
|
59
71
43 | impl<T: Hash + Eq> Foo<i8> for HashSet<T, S> {
60
72
| ^^^^^^^^^^^^^
73
+ help: ...and use generic constructor
74
+ |
75
+ 45 | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
76
+ | ^^^^^^^^^^^^^^^^^^
61
77
62
78
error: impl for `HashSet` should be generarized over different hashers
63
79
--> $DIR/implicit_hasher.rs:48:19
@@ -67,12 +83,16 @@ error: impl for `HashSet` should be generarized over different hashers
67
83
|
68
84
help: consider adding a type parameter
69
85
|
70
- 48 | impl<S: ::std::hash::BuildHasher> Foo<i16> for HashSet<String> {
71
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
86
+ 48 | impl<S: ::std::hash::BuildHasher + Default > Foo<i16> for HashSet<String> {
87
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72
88
help: ...and change the type to
73
89
|
74
90
48 | impl Foo<i16> for HashSet<String, S> {
75
91
| ^^^^^^^^^^^^^^^^^^
92
+ help: ...and use generic constructor
93
+ |
94
+ 50 | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
95
+ | ^^^^^^^^^^^^^^^^^^
76
96
77
97
error: parameter of type `HashMap` should be generarized over different hashers
78
98
--> $DIR/implicit_hasher.rs:65:23
@@ -115,12 +135,16 @@ error: impl for `HashMap` should be generarized over different hashers
115
135
|
116
136
help: consider adding a type parameter
117
137
|
118
- 70 | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher> Foo<u8> for HashMap<K, V> {
119
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
138
+ 70 | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default > Foo<u8> for HashMap<K, V> {
139
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120
140
help: ...and change the type to
121
141
|
122
142
70 | impl<K: Hash + Eq, V> Foo<u8> for HashMap<K, V, S> {
123
143
| ^^^^^^^^^^^^^^^^
144
+ help: ...and use generic constructor
145
+ |
146
+ 72 | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
147
+ | ^^^^^^^^^^^^^^^^^^
124
148
125
149
error: parameter of type `HashMap` should be generarized over different hashers
126
150
--> $DIR/implicit_hasher.rs:78:33
0 commit comments