about summary refs log tree commit diff
path: root/compiler/rustc_query_system
diff options
context:
space:
mode:
authorThe Miri Conjob Bot <miri@cron.bot>2024-02-17 05:17:43 +0000
committerThe Miri Conjob Bot <miri@cron.bot>2024-02-17 05:17:43 +0000
commitd523cab910d6b89b01dad9b283a67fb2256bc41e (patch)
tree4bdb17aaad138aa83a9464e32a25528bd360f020 /compiler/rustc_query_system
parent63240d758b0a6d48a8ea24799230ae2c47540fdd (diff)
parent4316d0c6252cb1f833e582dfa68adb98efd5ddfb (diff)
downloadrust-d523cab910d6b89b01dad9b283a67fb2256bc41e.tar.gz
rust-d523cab910d6b89b01dad9b283a67fb2256bc41e.zip
Merge from rustc
Diffstat (limited to 'compiler/rustc_query_system')
-rw-r--r--compiler/rustc_query_system/src/lib.rs1
-rw-r--r--compiler/rustc_query_system/src/query/job.rs4
2 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_query_system/src/lib.rs b/compiler/rustc_query_system/src/lib.rs
index 416f556f57d..6a959a99e5d 100644
--- a/compiler/rustc_query_system/src/lib.rs
+++ b/compiler/rustc_query_system/src/lib.rs
@@ -1,5 +1,6 @@
 #![feature(assert_matches)]
 #![feature(core_intrinsics)]
+#![feature(generic_nonzero)]
 #![feature(hash_raw_entry)]
 #![feature(min_specialization)]
 #![feature(let_chains)]
diff --git a/compiler/rustc_query_system/src/query/job.rs b/compiler/rustc_query_system/src/query/job.rs
index 8d7c0ca0144..bf89bc7f7c3 100644
--- a/compiler/rustc_query_system/src/query/job.rs
+++ b/compiler/rustc_query_system/src/query/job.rs
@@ -11,7 +11,7 @@ use rustc_span::Span;
 
 use std::hash::Hash;
 use std::io::Write;
-use std::num::NonZeroU64;
+use std::num::NonZero;
 
 #[cfg(parallel_compiler)]
 use {
@@ -36,7 +36,7 @@ pub type QueryMap = FxHashMap<QueryJobId, QueryJobInfo>;
 
 /// A value uniquely identifying an active query job.
 #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
-pub struct QueryJobId(pub NonZeroU64);
+pub struct QueryJobId(pub NonZero<u64>);
 
 impl QueryJobId {
     fn query(self, map: &QueryMap) -> QueryStackFrame {