]> git.lizzy.rs Git - rust.git/blob - tests/ui/implicit_hasher.stderr
Rustup https://github.com/rust-lang/rust/pull/67359
[rust.git] / tests / ui / implicit_hasher.stderr
1 error: impl for `HashMap` should be generalized over different hashers
2   --> $DIR/implicit_hasher.rs:15:35
3    |
4 LL | 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 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
13    |
14 LL |         (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:24:36
19    |
20 LL | impl<K: Hash + Eq, V> Foo<i8> for (HashMap<K, V>,) {
21    |                                    ^^^^^^^^^^^^^
22    |
23 help: consider adding a type parameter
24    |
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
28    |
29 LL |         ((HashMap::default(),), (HashMap::with_capacity_and_hasher(10, Default::default()),))
30    |           ^^^^^^^^^^^^^^^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31
32 error: impl for `HashMap` should be generalized over different hashers
33   --> $DIR/implicit_hasher.rs:29:19
34    |
35 LL | impl Foo<i16> for HashMap<String, String> {
36    |                   ^^^^^^^^^^^^^^^^^^^^^^^
37    |
38 help: consider adding a type parameter
39    |
40 LL | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashMap<String, String, S> {
41    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^              ^^^^^^^^^^^^^^^^^^^^^^^^^^
42 help: ...and use generic constructor
43    |
44 LL |         (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
45    |          ^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46
47 error: impl for `HashSet` should be generalized over different hashers
48   --> $DIR/implicit_hasher.rs:46:32
49    |
50 LL | impl<T: Hash + Eq> Foo<i8> for HashSet<T> {
51    |                                ^^^^^^^^^^
52    |
53 help: consider adding a type parameter
54    |
55 LL | impl<T: Hash + Eq, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashSet<T, S> {
56    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^             ^^^^^^^^^^^^^
57 help: ...and use generic constructor
58    |
59 LL |         (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
60    |          ^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
61
62 error: impl for `HashSet` should be generalized over different hashers
63   --> $DIR/implicit_hasher.rs:51:19
64    |
65 LL | impl Foo<i16> for HashSet<String> {
66    |                   ^^^^^^^^^^^^^^^
67    |
68 help: consider adding a type parameter
69    |
70 LL | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashSet<String, S> {
71    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^              ^^^^^^^^^^^^^^^^^^
72 help: ...and use generic constructor
73    |
74 LL |         (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
75    |          ^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76
77 error: parameter of type `HashMap` should be generalized over different hashers
78   --> $DIR/implicit_hasher.rs:68:23
79    |
80 LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
81    |                       ^^^^^^^^^^^^^^^^^
82    |
83 help: consider adding a type parameter
84    |
85 LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {}
86    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^            ^^^^^^^^^^^^^^^^^^^^
87
88 error: parameter of type `HashSet` should be generalized over different hashers
89   --> $DIR/implicit_hasher.rs:68:53
90    |
91 LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
92    |                                                     ^^^^^^^^^^^^
93    |
94 help: consider adding a type parameter
95    |
96 LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}
97    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                          ^^^^^^^^^^^^^^^
98
99 error: impl for `HashMap` should be generalized over different hashers
100   --> $DIR/implicit_hasher.rs:72:43
101    |
102 LL |         impl<K: Hash + Eq, V> Foo<u8> for HashMap<K, V> {
103    |                                           ^^^^^^^^^^^^^
104 ...
105 LL | gen!(impl);
106    | ----------- in this macro invocation
107    |
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
110    |
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
114    |
115 LL |                 (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
116    |                  ^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117
118 error: parameter of type `HashMap` should be generalized over different hashers
119   --> $DIR/implicit_hasher.rs:80:33
120    |
121 LL |         pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
122    |                                 ^^^^^^^^^^^^^^^^^
123 ...
124 LL | gen!(fn bar);
125    | ------------- in this macro invocation
126    |
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
129    |
130 LL |         pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {}
131    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^            ^^^^^^^^^^^^^^^^^^^^
132
133 error: parameter of type `HashSet` should be generalized over different hashers
134   --> $DIR/implicit_hasher.rs:80:63
135    |
136 LL |         pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
137    |                                                               ^^^^^^^^^^^^
138 ...
139 LL | gen!(fn bar);
140    | ------------- in this macro invocation
141    |
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
144    |
145 LL |         pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}
146    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                          ^^^^^^^^^^^^^^^
147
148 error: aborting due to 10 previous errors
149