about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/util.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-02-16 07:46:31 +0000
committerbors <bors@rust-lang.org>2024-02-16 07:46:31 +0000
commit1be468815cb7c6932fcc7ed3ee81e6a14376c05e (patch)
treeb0b4d37f0274c53c54e2245a73973c6ba1db47bd /compiler/rustc_interface/src/util.rs
parent0f806a9812b62c36bdab08d33c14cf2d3ecf4355 (diff)
parenta90cc05233858fcd16c3ca0e0b4320fc5ae09af2 (diff)
downloadrust-1be468815cb7c6932fcc7ed3ee81e6a14376c05e.tar.gz
rust-1be468815cb7c6932fcc7ed3ee81e6a14376c05e.zip
Auto merge of #120486 - reitermarkus:use-generic-nonzero, r=dtolnay
Use generic `NonZero` internally.

Tracking issue: https://github.com/rust-lang/rust/issues/120257
Diffstat (limited to 'compiler/rustc_interface/src/util.rs')
-rw-r--r--compiler/rustc_interface/src/util.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs
index 76b9e8de75f..087c43075f1 100644
--- a/compiler/rustc_interface/src/util.rs
+++ b/compiler/rustc_interface/src/util.rs
@@ -107,7 +107,7 @@ pub(crate) fn run_in_thread_pool_with_globals<F: FnOnce() -> R + Send, R: Send>(
     use rustc_query_impl::QueryCtxt;
     use rustc_query_system::query::{deadlock, QueryContext};
 
-    let registry = sync::Registry::new(std::num::NonZeroUsize::new(threads).unwrap());
+    let registry = sync::Registry::new(std::num::NonZero::new(threads).unwrap());
 
     if !sync::is_dyn_thread_safe() {
         return run_in_thread_with_globals(edition, || {