about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/util.rs
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2025-03-18 14:36:28 +0100
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2025-03-21 07:37:56 +0100
commit157008d7117ec9ca13b70c38058639524437112f (patch)
treea97a03ff94cdd59aec2e227cf4bc48bc7e0cc56c /compiler/rustc_interface/src/util.rs
parent077b8d5c370391d428dbb4d3d037f6e51b1349a8 (diff)
downloadrust-157008d7117ec9ca13b70c38058639524437112f.tar.gz
rust-157008d7117ec9ca13b70c38058639524437112f.zip
Update comments
Diffstat (limited to 'compiler/rustc_interface/src/util.rs')
-rw-r--r--compiler/rustc_interface/src/util.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs
index 0904795529e..249b80bb31d 100644
--- a/compiler/rustc_interface/src/util.rs
+++ b/compiler/rustc_interface/src/util.rs
@@ -195,9 +195,10 @@ pub(crate) fn run_in_thread_pool_with_globals<F: FnOnce(CurrentGcx) -> R + Send,
                     tls::with(|tcx| {
                         let (query_map, complete) = QueryCtxt::new(tcx).collect_active_jobs();
                         if !complete {
+                            // There was an unexpected error collecting all active jobs, which we need
+                            // to find cycles to break.
+                            // We want to avoid panicking in the deadlock handler, so we abort instead.
                             eprintln!("internal compiler error: failed to get query map in deadlock handler, aborting process");
-                            // We need to abort here as we failed to resolve the deadlock,
-                            // otherwise the compiler could just hang,
                             process::abort();
                         }
                         query_map