]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/implicit_hasher.stderr
New upstream version 1.23.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / implicit_hasher.stderr
1 error: impl for `HashMap` should be generalized over different hashers
2 --> $DIR/implicit_hasher.rs:11:35
3 |
4 11 | impl<K: Hash + Eq, V> Foo<i8> for HashMap<K, V> {
5 | ^^^^^^^^^^^^^
6 |
7 = note: `-D implicit-hasher` implied by `-D warnings`
8 help: consider adding a type parameter
9 |
10 11 | 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 17 | (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:20:36
19 |
20 20 | impl<K: Hash + Eq, V> Foo<i8> for (HashMap<K, V>,) {
21 | ^^^^^^^^^^^^^
22 |
23 help: consider adding a type parameter
24 |
25 20 | 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 22 | ((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:25:19
34 |
35 25 | impl Foo<i16> for HashMap<String, String> {
36 | ^^^^^^^^^^^^^^^^^^^^^^^
37 |
38 help: consider adding a type parameter
39 |
40 25 | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashMap<String, String, S> {
41 |
42 help: ...and use generic constructor
43 |
44 27 | (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:43:32
49 |
50 43 | impl<T: Hash + Eq> Foo<i8> for HashSet<T> {
51 | ^^^^^^^^^^
52 |
53 help: consider adding a type parameter
54 |
55 43 | impl<T: Hash + Eq, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashSet<T, S> {
56 |
57 help: ...and use generic constructor
58 |
59 45 | (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:48:19
64 |
65 48 | impl Foo<i16> for HashSet<String> {
66 | ^^^^^^^^^^^^^^^
67 |
68 help: consider adding a type parameter
69 |
70 48 | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashSet<String, S> {
71 |
72 help: ...and use generic constructor
73 |
74 50 | (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:65:23
79 |
80 65 | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {
81 | ^^^^^^^^^^^^^^^^^
82 |
83 help: consider adding a type parameter
84 |
85 65 | 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:65:53
90 |
91 65 | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {
92 | ^^^^^^^^^^^^
93 |
94 help: consider adding a type parameter
95 |
96 65 | 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:70:43
101 |
102 70 | impl<K: Hash + Eq, V> Foo<u8> for HashMap<K, V> {
103 | ^^^^^^^^^^^^^
104 ...
105 83 | gen!(impl);
106 | ----------- in this macro invocation
107 |
108 help: consider adding a type parameter
109 |
110 70 | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<u8> for HashMap<K, V, S> {
111 |
112 help: ...and use generic constructor
113 |
114 72 | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
115 |
116
117 error: parameter of type `HashMap` should be generalized over different hashers
118 --> $DIR/implicit_hasher.rs:78:33
119 |
120 78 | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {
121 | ^^^^^^^^^^^^^^^^^
122 ...
123 84 | gen!(fn bar);
124 | ------------- in this macro invocation
125 |
126 help: consider adding a type parameter
127 |
128 78 | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {
129 |
130
131 error: parameter of type `HashSet` should be generalized over different hashers
132 --> $DIR/implicit_hasher.rs:78:63
133 |
134 78 | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {
135 | ^^^^^^^^^^^^
136 ...
137 84 | gen!(fn bar);
138 | ------------- in this macro invocation
139 |
140 help: consider adding a type parameter
141 |
142 78 | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {
143 |
144