about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2021-05-01 00:06:17 -0400
committerJoshua Nelson <jyn514@gmail.com>2021-05-01 00:25:11 -0400
commit1da44451098e9947fa398e7d2858853a8964c200 (patch)
tree1e1d6c36af7ba5a4fa9c6dc1b0a1e5f950430561 /compiler/rustc_query_impl/src
parentb52769b804a12b7045ee1bce893a64045cdb974a (diff)
downloadrust-1da44451098e9947fa398e7d2858853a8964c200.tar.gz
rust-1da44451098e9947fa398e7d2858853a8964c200.zip
Apply `--cfg parallel_compiler` when documenting
This also reverts commit 9823c2cc700fea541bf2670fcee93af662b63022
working around the bug.
Diffstat (limited to 'compiler/rustc_query_impl/src')
-rw-r--r--compiler/rustc_query_impl/src/plumbing.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs
index ee914fa1ba9..c789aa2fa59 100644
--- a/compiler/rustc_query_impl/src/plumbing.rs
+++ b/compiler/rustc_query_impl/src/plumbing.rs
@@ -550,12 +550,10 @@ macro_rules! define_queries_struct {
         }
 
         impl QueryEngine<'tcx> for Queries<'tcx> {
-            unsafe fn deadlock(&'tcx self, _tcx: TyCtxt<'tcx>, _registry: &rustc_rayon_core::Registry) {
-                #[cfg(parallel_compiler)]
-                {
-                    let tcx = QueryCtxt { tcx: _tcx, queries: self };
-                    rustc_query_system::query::deadlock(tcx, _registry)
-                }
+            #[cfg(parallel_compiler)]
+            unsafe fn deadlock(&'tcx self, tcx: TyCtxt<'tcx>, registry: &rustc_rayon_core::Registry) {
+                let tcx = QueryCtxt { tcx, queries: self };
+                rustc_query_system::query::deadlock(tcx, registry)
             }
 
             fn encode_query_results(