Use generic NonZero internally.

This commit is contained in:
Markus Reiter
2024-01-29 23:59:09 +01:00
parent ee9c7c940c
commit 746a58d435
144 changed files with 653 additions and 604 deletions

View File

@@ -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::<usize>::new(threads).unwrap());
if !sync::is_dyn_thread_safe() {
return run_in_thread_with_globals(edition, || {