about summary refs log tree commit diff
path: root/compiler/rustc_query_impl
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2021-02-09 18:53:38 +0100
committerCamille GILLOT <gillot.camille@gmail.com>2021-02-21 12:22:22 +0100
commit903f65f215812ca4d40e1efc6a5f234e0ab5728c (patch)
tree48432029af991c7b46b1a3279c2b290f3ef83175 /compiler/rustc_query_impl
parenta87de890fd1a797952ab49459aeca4ce598d8f15 (diff)
downloadrust-903f65f215812ca4d40e1efc6a5f234e0ab5728c.tar.gz
rust-903f65f215812ca4d40e1efc6a5f234e0ab5728c.zip
Simplify hashing.
Diffstat (limited to 'compiler/rustc_query_impl')
-rw-r--r--compiler/rustc_query_impl/src/plumbing.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs
index 4618671ddf0..37a176de941 100644
--- a/compiler/rustc_query_impl/src/plumbing.rs
+++ b/compiler/rustc_query_impl/src/plumbing.rs
@@ -339,12 +339,12 @@ macro_rules! define_queries {
                 } else {
                     Some(key.default_span(*tcx))
                 };
-                let hash = {
+                let hash = || {
                     let mut hcx = tcx.create_stable_hashing_context();
                     let mut hasher = StableHasher::new();
                     std::mem::discriminant(&kind).hash_stable(&mut hcx, &mut hasher);
                     key.hash_stable(&mut hcx, &mut hasher);
-                    hasher.finish()
+                    hasher.finish::<u64>()
                 };
 
                 QueryStackFrame::new(name, description, span, hash)