summary refs log tree commit diff
path: root/compiler/rustc_middle/src/dep_graph
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_middle/src/dep_graph
parent3dcb616888aac50d55160b025266d555dad937d9 (diff)
downloadrust-43bb31b9540a439dcca65f47b8644eafe4a42e2d.tar.gz
rust-43bb31b9540a439dcca65f47b8644eafe4a42e2d.zip
Allow to create definitions inside the query system.
Diffstat (limited to 'compiler/rustc_middle/src/dep_graph')
-rw-r--r--compiler/rustc_middle/src/dep_graph/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/dep_graph/mod.rs b/compiler/rustc_middle/src/dep_graph/mod.rs
index e335cb395f8..5f3f1a3bc6c 100644
--- a/compiler/rustc_middle/src/dep_graph/mod.rs
+++ b/compiler/rustc_middle/src/dep_graph/mod.rs
@@ -71,8 +71,8 @@ impl<'tcx> DepContext for TyCtxt<'tcx> {
     type DepKind = DepKind;
 
     #[inline]
-    fn create_stable_hashing_context(&self) -> StableHashingContext<'_> {
-        TyCtxt::create_stable_hashing_context(*self)
+    fn with_stable_hashing_context<R>(&self, f: impl FnOnce(StableHashingContext<'_>) -> R) -> R {
+        TyCtxt::with_stable_hashing_context(*self, f)
     }
 
     #[inline]