about summary refs log tree commit diff
path: root/src/librustc
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2020-03-25 07:52:12 +0100
committerCamille GILLOT <gillot.camille@gmail.com>2020-03-26 09:40:52 +0100
commitd224e214e051a92c5313a2d4ec0c94d41c4ba01d (patch)
tree558289a754b8c9caceaaa62dcf0ce9bedb3a6896 /src/librustc
parentfce0d37619736b0e56eabab8f9064fad471a2b5f (diff)
downloadrust-d224e214e051a92c5313a2d4ec0c94d41c4ba01d.tar.gz
rust-d224e214e051a92c5313a2d4ec0c94d41c4ba01d.zip
Rename read_query_job -> current_query_job and simplify it.
Diffstat (limited to 'src/librustc')
-rw-r--r--src/librustc/ty/query/plumbing.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/ty/query/plumbing.rs b/src/librustc/ty/query/plumbing.rs
index 8e34aba8a9e..8cdc1ae27ee 100644
--- a/src/librustc/ty/query/plumbing.rs
+++ b/src/librustc/ty/query/plumbing.rs
@@ -32,8 +32,8 @@ impl QueryContext for TyCtxt<'tcx> {
         &self.dep_graph
     }
 
-    fn read_query_job<R>(&self, op: impl FnOnce(Option<QueryJobId<Self::DepKind>>) -> R) -> R {
-        tls::with_related_context(*self, move |icx| op(icx.query))
+    fn current_query_job(&self) -> Option<QueryJobId<Self::DepKind>> {
+        tls::with_related_context(*self, |icx| icx.query)
     }
 
     fn try_collect_active_jobs(