]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/implicit_hasher.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / implicit_hasher.stderr
CommitLineData
f20569fa
XL
1error: impl for `HashMap` should be generalized over different hashers
2 --> $DIR/implicit_hasher.rs:16:35
3 |
4LL | impl<K: Hash + Eq, V> Foo<i8> for HashMap<K, V> {
5 | ^^^^^^^^^^^^^
6 |
7note: the lint level is defined here
8 --> $DIR/implicit_hasher.rs:2:9
9 |
10LL | #![deny(clippy::implicit_hasher)]
11 | ^^^^^^^^^^^^^^^^^^^^^^^
12help: consider adding a type parameter
13 |
14LL | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashMap<K, V, S> {
94222f64 15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
f20569fa
XL
16help: ...and use generic constructor
17 |
18LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
94222f64 19 | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
f20569fa
XL
20
21error: impl for `HashMap` should be generalized over different hashers
22 --> $DIR/implicit_hasher.rs:25:36
23 |
24LL | impl<K: Hash + Eq, V> Foo<i8> for (HashMap<K, V>,) {
25 | ^^^^^^^^^^^^^
26 |
27help: consider adding a type parameter
28 |
29LL | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<i8> for (HashMap<K, V, S>,) {
94222f64 30 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
f20569fa
XL
31help: ...and use generic constructor
32 |
33LL | ((HashMap::default(),), (HashMap::with_capacity_and_hasher(10, Default::default()),))
94222f64 34 | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
f20569fa
XL
35
36error: impl for `HashMap` should be generalized over different hashers
37 --> $DIR/implicit_hasher.rs:30:19
38 |
39LL | impl Foo<i16> for HashMap<String, String> {
40 | ^^^^^^^^^^^^^^^^^^^^^^^
41 |
42help: consider adding a type parameter
43 |
44LL | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashMap<String, String, S> {
94222f64 45 | +++++++++++++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~~~~~~~~~
f20569fa
XL
46help: ...and use generic constructor
47 |
48LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
94222f64 49 | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
f20569fa
XL
50
51error: impl for `HashSet` should be generalized over different hashers
52 --> $DIR/implicit_hasher.rs:47:32
53 |
54LL | impl<T: Hash + Eq> Foo<i8> for HashSet<T> {
55 | ^^^^^^^^^^
56 |
57help: consider adding a type parameter
58 |
59LL | impl<T: Hash + Eq, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashSet<T, S> {
94222f64 60 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~
f20569fa
XL
61help: ...and use generic constructor
62 |
63LL | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
94222f64 64 | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
f20569fa
XL
65
66error: impl for `HashSet` should be generalized over different hashers
67 --> $DIR/implicit_hasher.rs:52:19
68 |
69LL | impl Foo<i16> for HashSet<String> {
70 | ^^^^^^^^^^^^^^^
71 |
72help: consider adding a type parameter
73 |
74LL | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashSet<String, S> {
94222f64 75 | +++++++++++++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~
f20569fa
XL
76help: ...and use generic constructor
77 |
78LL | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
94222f64 79 | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
f20569fa
XL
80
81error: parameter of type `HashMap` should be generalized over different hashers
82 --> $DIR/implicit_hasher.rs:69:23
83 |
84LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
85 | ^^^^^^^^^^^^^^^^^
86 |
87help: consider adding a type parameter
88 |
89LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {}
94222f64 90 | +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~~~
f20569fa
XL
91
92error: parameter of type `HashSet` should be generalized over different hashers
93 --> $DIR/implicit_hasher.rs:69:53
94 |
95LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
96 | ^^^^^^^^^^^^
97 |
98help: consider adding a type parameter
99 |
100LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}
94222f64 101 | +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~
f20569fa
XL
102
103error: impl for `HashMap` should be generalized over different hashers
104 --> $DIR/implicit_hasher.rs:73:43
105 |
106LL | impl<K: Hash + Eq, V> Foo<u8> for HashMap<K, V> {
107 | ^^^^^^^^^^^^^
108...
109LL | gen!(impl);
110 | ----------- in this macro invocation
111 |
17df50a5 112 = note: this error originates in the macro `gen` (in Nightly builds, run with -Z macro-backtrace for more info)
f20569fa
XL
113help: consider adding a type parameter
114 |
115LL | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<u8> for HashMap<K, V, S> {
94222f64 116 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
f20569fa
XL
117help: ...and use generic constructor
118 |
119LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
94222f64 120 | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
f20569fa
XL
121
122error: parameter of type `HashMap` should be generalized over different hashers
123 --> $DIR/implicit_hasher.rs:81:33
124 |
125LL | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
126 | ^^^^^^^^^^^^^^^^^
127...
128LL | gen!(fn bar);
129 | ------------- in this macro invocation
130 |
17df50a5 131 = note: this error originates in the macro `gen` (in Nightly builds, run with -Z macro-backtrace for more info)
f20569fa
XL
132help: consider adding a type parameter
133 |
134LL | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {}
94222f64 135 | +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~~~
f20569fa
XL
136
137error: parameter of type `HashSet` should be generalized over different hashers
138 --> $DIR/implicit_hasher.rs:81:63
139 |
140LL | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
141 | ^^^^^^^^^^^^
142...
143LL | gen!(fn bar);
144 | ------------- in this macro invocation
145 |
17df50a5 146 = note: this error originates in the macro `gen` (in Nightly builds, run with -Z macro-backtrace for more info)
f20569fa
XL
147help: consider adding a type parameter
148 |
149LL | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}
94222f64 150 | +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~
f20569fa
XL
151
152error: aborting due to 10 previous errors
153