]> git.lizzy.rs Git - rust.git/blob - tests/ui/implicit_hasher.stderr
Merge branch 'master' into rustfmt_tests
[rust.git] / tests / ui / implicit_hasher.stderr
1 error: impl for `HashMap` should be generalized over different hashers
2   --> $DIR/implicit_hasher.rs:20:35
3    |
4 20 | impl<K: Hash + Eq, V> Foo<i8> for HashMap<K, V> {
5    |                                   ^^^^^^^^^^^^^
6    |
7    = note: `-D clippy::implicit-hasher` implied by `-D warnings`
8 help: consider adding a type parameter
9    |
10 20 | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashMap<K, V, S> {
11    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^             ^^^^^^^^^^^^^^^^
12 help: ...and use generic constructor
13    |
14 26 |         (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
15    |          ^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16
17 error: impl for `HashMap` should be generalized over different hashers
18   --> $DIR/implicit_hasher.rs:29:36
19    |
20 29 | impl<K: Hash + Eq, V> Foo<i8> for (HashMap<K, V>,) {
21    |                                    ^^^^^^^^^^^^^
22 help: consider adding a type parameter
23    |
24 29 | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<i8> for (HashMap<K, V, S>,) {
25    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^              ^^^^^^^^^^^^^^^^
26 help: ...and use generic constructor
27    |
28 31 |         ((HashMap::default(),), (HashMap::with_capacity_and_hasher(10, Default::default()),))
29    |           ^^^^^^^^^^^^^^^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30
31 error: impl for `HashMap` should be generalized over different hashers
32   --> $DIR/implicit_hasher.rs:34:19
33    |
34 34 | impl Foo<i16> for HashMap<String, String> {
35    |                   ^^^^^^^^^^^^^^^^^^^^^^^
36 help: consider adding a type parameter
37    |
38 34 | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashMap<String, String, S> {
39    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^              ^^^^^^^^^^^^^^^^^^^^^^^^^^
40 help: ...and use generic constructor
41    |
42 36 |         (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
43    |          ^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44
45 error: impl for `HashSet` should be generalized over different hashers
46   --> $DIR/implicit_hasher.rs:51:32
47    |
48 51 | impl<T: Hash + Eq> Foo<i8> for HashSet<T> {
49    |                                ^^^^^^^^^^
50 help: consider adding a type parameter
51    |
52 51 | impl<T: Hash + Eq, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashSet<T, S> {
53    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^             ^^^^^^^^^^^^^
54 help: ...and use generic constructor
55    |
56 53 |         (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
57    |          ^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
58
59 error: impl for `HashSet` should be generalized over different hashers
60   --> $DIR/implicit_hasher.rs:56:19
61    |
62 56 | impl Foo<i16> for HashSet<String> {
63    |                   ^^^^^^^^^^^^^^^
64 help: consider adding a type parameter
65    |
66 56 | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashSet<String, S> {
67    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^              ^^^^^^^^^^^^^^^^^^
68 help: ...and use generic constructor
69    |
70 58 |         (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
71    |          ^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72
73 error: parameter of type `HashMap` should be generalized over different hashers
74   --> $DIR/implicit_hasher.rs:73:23
75    |
76 73 | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
77    |                       ^^^^^^^^^^^^^^^^^
78 help: consider adding a type parameter
79    |
80 73 | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {}
81    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^            ^^^^^^^^^^^^^^^^^^^^
82
83 error: parameter of type `HashSet` should be generalized over different hashers
84   --> $DIR/implicit_hasher.rs:73:53
85    |
86 73 | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
87    |                                                     ^^^^^^^^^^^^
88 help: consider adding a type parameter
89    |
90 73 | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}
91    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                          ^^^^^^^^^^^^^^^
92
93 error: impl for `HashMap` should be generalized over different hashers
94   --> $DIR/implicit_hasher.rs:77:43
95    |
96 77 |         impl<K: Hash + Eq, V> Foo<u8> for HashMap<K, V> {
97    |                                           ^^^^^^^^^^^^^
98 ...
99 89 | gen!(impl );
100    | ------------ in this macro invocation
101 help: consider adding a type parameter
102    |
103 77 |         impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<u8> for HashMap<K, V, S> {
104    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^             ^^^^^^^^^^^^^^^^
105 help: ...and use generic constructor
106    |
107 79 |                 (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
108    |                  ^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
109
110 error: parameter of type `HashMap` should be generalized over different hashers
111   --> $DIR/implicit_hasher.rs:85:33
112    |
113 85 |         pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
114    |                                 ^^^^^^^^^^^^^^^^^
115 ...
116 90 | gen!(fn bar);
117    | ------------- in this macro invocation
118 help: consider adding a type parameter
119    |
120 85 |         pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {}
121    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^            ^^^^^^^^^^^^^^^^^^^^
122
123 error: parameter of type `HashSet` should be generalized over different hashers
124   --> $DIR/implicit_hasher.rs:85:63
125    |
126 85 |         pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
127    |                                                               ^^^^^^^^^^^^
128 ...
129 90 | gen!(fn bar);
130    | ------------- in this macro invocation
131 help: consider adding a type parameter
132    |
133 85 |         pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}
134    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                          ^^^^^^^^^^^^^^^
135
136 error: aborting due to 10 previous errors
137