about summary refs log tree commit diff
path: root/compiler/rustc_query_system/src/dep_graph/graph.rs
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2021-07-12 22:19:25 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2022-07-06 22:50:55 +0200
commit43bb31b9540a439dcca65f47b8644eafe4a42e2d (patch)
tree8c707ae5bb7b76fd39b0b0b811e50fd336e5cd17 /compiler/rustc_query_system/src/dep_graph/graph.rs
parent3dcb616888aac50d55160b025266d555dad937d9 (diff)
downloadrust-43bb31b9540a439dcca65f47b8644eafe4a42e2d.tar.gz
rust-43bb31b9540a439dcca65f47b8644eafe4a42e2d.zip
Allow to create definitions inside the query system.
Diffstat (limited to 'compiler/rustc_query_system/src/dep_graph/graph.rs')
-rw-r--r--compiler/rustc_query_system/src/dep_graph/graph.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_query_system/src/dep_graph/graph.rs b/compiler/rustc_query_system/src/dep_graph/graph.rs
index 341cf8f827b..0e1419f8a48 100644
--- a/compiler/rustc_query_system/src/dep_graph/graph.rs
+++ b/compiler/rustc_query_system/src/dep_graph/graph.rs
@@ -328,10 +328,8 @@ impl<K: DepKind> DepGraph<K> {
 
         let dcx = cx.dep_context();
         let hashing_timer = dcx.profiler().incr_result_hashing();
-        let current_fingerprint = hash_result.map(|f| {
-            let mut hcx = dcx.create_stable_hashing_context();
-            f(&mut hcx, &result)
-        });
+        let current_fingerprint =
+            hash_result.map(|f| dcx.with_stable_hashing_context(|mut hcx| f(&mut hcx, &result)));
 
         let print_status = cfg!(debug_assertions) && dcx.sess().opts.debugging_opts.dep_tasks;