Use generic NonZero
internally.
This commit is contained in:
parent
ee9c7c940c
commit
746a58d435
144 changed files with 653 additions and 604 deletions
|
@ -3,6 +3,7 @@
|
|||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
||||
#![doc(rust_logo)]
|
||||
#![feature(rustdoc_internals)]
|
||||
#![feature(generic_nonzero)]
|
||||
#![feature(min_specialization)]
|
||||
#![feature(rustc_attrs)]
|
||||
#![allow(rustc::potential_query_instability, unused_parens)]
|
||||
|
|
|
@ -30,7 +30,7 @@ use rustc_serialize::Decodable;
|
|||
use rustc_serialize::Encodable;
|
||||
use rustc_session::Limit;
|
||||
use rustc_span::def_id::LOCAL_CRATE;
|
||||
use std::num::NonZeroU64;
|
||||
use std::num::NonZero;
|
||||
use thin_vec::ThinVec;
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
|
@ -68,7 +68,7 @@ impl QueryContext for QueryCtxt<'_> {
|
|||
#[inline]
|
||||
fn next_job_id(self) -> QueryJobId {
|
||||
QueryJobId(
|
||||
NonZeroU64::new(
|
||||
NonZero::<u64>::new(
|
||||
self.query_system.jobs.fetch_add(1, std::sync::atomic::Ordering::Relaxed),
|
||||
)
|
||||
.unwrap(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue