about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-28 02:05:26 +0000
committerbors <bors@rust-lang.org>2023-11-28 02:05:26 +0000
commitc2ec90854a0d3a3e1570cf7acfdd2c9e50aa3b2a (patch)
tree5fc9b9c573cad226f388cefb957c03983923675d /compiler/rustc_interface/src
parent49b3924bd4a34d3cf9c37b74120fba78d9712ab8 (diff)
parent2aca7247a7c63d43510ac136c5e26c8ddfd40180 (diff)
downloadrust-c2ec90854a0d3a3e1570cf7acfdd2c9e50aa3b2a.tar.gz
rust-c2ec90854a0d3a3e1570cf7acfdd2c9e50aa3b2a.zip
Auto merge of #118395 - compiler-errors:rollup-c8yqlmw, r=compiler-errors
Rollup of 9 pull requests

Successful merges:

 - #111133 (Detect Python-like slicing and suggest how to fix)
 - #114708 (Allow setting `rla` labels via `rustbot`)
 - #117526 (Account for `!` arm in tail `match` expr)
 - #118172 (Add `pretty_terminator` to pretty stable-mir)
 - #118202 (Added linker_arg(s) Linker trait methods for link-arg to be prefixed "-Wl," for cc-like linker args and not verbatim)
 - #118374 (QueryContext: rename try_collect_active_jobs -> collect_active_jobs, change return type from Option<QueryMap> to QueryMap)
 - #118381 (rustc_span: Use correct edit distance start length for suggestions)
 - #118382 (Address unused tuple struct fields in the compiler)
 - #118384 (Address unused tuple struct fields in rustdoc)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_interface/src')
-rw-r--r--compiler/rustc_interface/src/util.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs
index b3ab01a740a..c9c7ffdd937 100644
--- a/compiler/rustc_interface/src/util.rs
+++ b/compiler/rustc_interface/src/util.rs
@@ -126,11 +126,8 @@ pub(crate) fn run_in_thread_pool_with_globals<F: FnOnce() -> R + Send, R: Send>(
         .deadlock_handler(|| {
             // On deadlock, creates a new thread and forwards information in thread
             // locals to it. The new thread runs the deadlock handler.
-            let query_map = FromDyn::from(tls::with(|tcx| {
-                QueryCtxt::new(tcx)
-                    .try_collect_active_jobs()
-                    .expect("active jobs shouldn't be locked in deadlock handler")
-            }));
+            let query_map =
+                FromDyn::from(tls::with(|tcx| QueryCtxt::new(tcx).collect_active_jobs()));
             let registry = rayon_core::Registry::current();
             thread::spawn(move || deadlock(query_map.into_inner(), &registry));
         });