about summary refs log tree commit diff
path: root/compiler/rustc_query_system
diff options
context:
space:
mode:
authorSparrowLii <liyuan179@huawei.com>2022-06-29 10:02:30 +0800
committerSparrowLii <liyuan179@huawei.com>2022-06-29 10:02:30 +0800
commitfbca21edd27dcd6e49a8020ed77a133ffa357c63 (patch)
tree2e95e882f80b978ca28d27324f23eb5b07e0c2d4 /compiler/rustc_query_system
parent3b0d4813ab461ec81eab8980bb884691c97c5a35 (diff)
downloadrust-fbca21edd27dcd6e49a8020ed77a133ffa357c63.tar.gz
rust-fbca21edd27dcd6e49a8020ed77a133ffa357c63.zip
get rid of `tcx` in deadlock handler when parallel compilation
Diffstat (limited to 'compiler/rustc_query_system')
-rw-r--r--compiler/rustc_query_system/src/query/job.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_query_system/src/query/job.rs b/compiler/rustc_query_system/src/query/job.rs
index 2a07d9b7f80..f1316557c29 100644
--- a/compiler/rustc_query_system/src/query/job.rs
+++ b/compiler/rustc_query_system/src/query/job.rs
@@ -492,14 +492,13 @@ fn remove_cycle(
 /// There may be multiple cycles involved in a deadlock, so this searches
 /// all active queries for cycles before finally resuming all the waiters at once.
 #[cfg(parallel_compiler)]
-pub fn deadlock<CTX: QueryContext>(tcx: CTX, registry: &rayon_core::Registry) {
+pub fn deadlock(query_map: QueryMap, registry: &rayon_core::Registry) {
     let on_panic = OnDrop(|| {
         eprintln!("deadlock handler panicked, aborting process");
         process::abort();
     });
 
     let mut wakelist = Vec::new();
-    let query_map = tcx.try_collect_active_jobs().unwrap();
     let mut jobs: Vec<QueryJobId> = query_map.keys().cloned().collect();
 
     let mut found_cycle = false;