1
1
error: impl for `HashMap` should be generalized over different hashers
2
- --> $DIR/implicit_hasher.rs:15 :35
2
+ --> $DIR/implicit_hasher.rs:16 :35
3
3
|
4
4
LL | impl<K: Hash + Eq, V> Foo<i8> for HashMap<K, V> {
5
5
| ^^^^^^^^^^^^^
6
6
|
7
- = note: `-D clippy::implicit-hasher` implied by `-D warnings`
7
+ note: the lint level is defined here
8
+ --> $DIR/implicit_hasher.rs:2:9
9
+ |
10
+ LL | #![deny(clippy::implicit_hasher)]
11
+ | ^^^^^^^^^^^^^^^^^^^^^^^
8
12
help: consider adding a type parameter
9
13
|
10
14
LL | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashMap<K, V, S> {
@@ -15,7 +19,7 @@ LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default:
15
19
| ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16
20
17
21
error: impl for `HashMap` should be generalized over different hashers
18
- --> $DIR/implicit_hasher.rs:24 :36
22
+ --> $DIR/implicit_hasher.rs:25 :36
19
23
|
20
24
LL | impl<K: Hash + Eq, V> Foo<i8> for (HashMap<K, V>,) {
21
25
| ^^^^^^^^^^^^^
@@ -30,7 +34,7 @@ LL | ((HashMap::default(),), (HashMap::with_capacity_and_hasher(10, Defa
30
34
| ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31
35
32
36
error: impl for `HashMap` should be generalized over different hashers
33
- --> $DIR/implicit_hasher.rs:29 :19
37
+ --> $DIR/implicit_hasher.rs:30 :19
34
38
|
35
39
LL | impl Foo<i16> for HashMap<String, String> {
36
40
| ^^^^^^^^^^^^^^^^^^^^^^^
@@ -45,7 +49,7 @@ LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default:
45
49
| ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46
50
47
51
error: impl for `HashSet` should be generalized over different hashers
48
- --> $DIR/implicit_hasher.rs:46 :32
52
+ --> $DIR/implicit_hasher.rs:47 :32
49
53
|
50
54
LL | impl<T: Hash + Eq> Foo<i8> for HashSet<T> {
51
55
| ^^^^^^^^^^
@@ -60,7 +64,7 @@ LL | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default:
60
64
| ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
61
65
62
66
error: impl for `HashSet` should be generalized over different hashers
63
- --> $DIR/implicit_hasher.rs:51 :19
67
+ --> $DIR/implicit_hasher.rs:52 :19
64
68
|
65
69
LL | impl Foo<i16> for HashSet<String> {
66
70
| ^^^^^^^^^^^^^^^
@@ -75,7 +79,7 @@ LL | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default:
75
79
| ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76
80
77
81
error: parameter of type `HashMap` should be generalized over different hashers
78
- --> $DIR/implicit_hasher.rs:68 :23
82
+ --> $DIR/implicit_hasher.rs:69 :23
79
83
|
80
84
LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
81
85
| ^^^^^^^^^^^^^^^^^
@@ -86,7 +90,7 @@ LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _s
86
90
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^
87
91
88
92
error: parameter of type `HashSet` should be generalized over different hashers
89
- --> $DIR/implicit_hasher.rs:68 :53
93
+ --> $DIR/implicit_hasher.rs:69 :53
90
94
|
91
95
LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
92
96
| ^^^^^^^^^^^^
@@ -97,7 +101,7 @@ LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set:
97
101
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
98
102
99
103
error: impl for `HashMap` should be generalized over different hashers
100
- --> $DIR/implicit_hasher.rs:72 :43
104
+ --> $DIR/implicit_hasher.rs:73 :43
101
105
|
102
106
LL | impl<K: Hash + Eq, V> Foo<u8> for HashMap<K, V> {
103
107
| ^^^^^^^^^^^^^
@@ -116,7 +120,7 @@ LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10,
116
120
| ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117
121
118
122
error: parameter of type `HashMap` should be generalized over different hashers
119
- --> $DIR/implicit_hasher.rs:80 :33
123
+ --> $DIR/implicit_hasher.rs:81 :33
120
124
|
121
125
LL | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
122
126
| ^^^^^^^^^^^^^^^^^
@@ -131,7 +135,7 @@ LL | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i
131
135
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^
132
136
133
137
error: parameter of type `HashSet` should be generalized over different hashers
134
- --> $DIR/implicit_hasher.rs:80 :63
138
+ --> $DIR/implicit_hasher.rs:81 :63
135
139
|
136
140
LL | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
137
141
| ^^^^^^^^^^^^
0 commit comments