]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/implicit_hasher.stderr
Auto merge of #9684 - kraktus:ref_option_ref, r=xFrednet
[rust.git] / tests / ui / implicit_hasher.stderr
index 2e62dd30f9fc59f7b11ca90b7145a517dc28037f..59b0fba2a4cfee460b8e2d120a91b01fb1c3d952 100644 (file)
@@ -107,7 +107,7 @@ LL |         impl<K: Hash + Eq, V> Foo<u8> for HashMap<K, V> {
    |                                           ^^^^^^^^^^^^^
 ...
 LL | gen!(impl);
-   | ----------- in this macro invocation
+   | ---------- in this macro invocation
    |
    = note: this error originates in the macro `gen` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider adding a type parameter
@@ -126,7 +126,7 @@ LL |         pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>)
    |                                 ^^^^^^^^^^^^^^^^^
 ...
 LL | gen!(fn bar);
-   | ------------- in this macro invocation
+   | ------------ in this macro invocation
    |
    = note: this error originates in the macro `gen` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider adding a type parameter
@@ -141,7 +141,7 @@ LL |         pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>)
    |                                                               ^^^^^^^^^^^^
 ...
 LL | gen!(fn bar);
-   | ------------- in this macro invocation
+   | ------------ in this macro invocation
    |
    = note: this error originates in the macro `gen` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider adding a type parameter
@@ -149,5 +149,16 @@ help: consider adding a type parameter
 LL |         pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}
    |                     +++++++++++++++++++++++++++++                                          ~~~~~~~~~~~~~~~
 
-error: aborting due to 10 previous errors
+error: parameter of type `HashMap` should be generalized over different hashers
+  --> $DIR/implicit_hasher.rs:100:35
+   |
+LL | pub async fn election_vote(_data: HashMap<i32, i32>) {}
+   |                                   ^^^^^^^^^^^^^^^^^
+   |
+help: consider adding a type parameter
+   |
+LL | pub async fn election_vote<S: ::std::hash::BuildHasher>(_data: HashMap<i32, i32, S>) {}
+   |                           +++++++++++++++++++++++++++++        ~~~~~~~~~~~~~~~~~~~~
+
+error: aborting due to 11 previous errors