diff --git a/library/proc_macro/src/bridge/symbol.rs b/library/proc_macro/src/bridge/symbol.rs index 712f6b45458..02225d20b26 100644 --- a/library/proc_macro/src/bridge/symbol.rs +++ b/library/proc_macro/src/bridge/symbol.rs @@ -136,7 +136,7 @@ thread_local! { arena: arena::Arena::new(), names: fxhash::FxHashMap::default(), strings: Vec::new(), - // Start with a base of 1 to make sure that `NonZeroU32` works. + // Start with a base of 1 to make sure that `NonZero` works. sym_base: NonZero::new(1).unwrap(), }); } diff --git a/library/test/src/helpers/concurrency.rs b/library/test/src/helpers/concurrency.rs index eb211157371..b395adcf885 100644 --- a/library/test/src/helpers/concurrency.rs +++ b/library/test/src/helpers/concurrency.rs @@ -1,10 +1,10 @@ //! Helper module which helps to determine amount of threads to be used //! during tests execution. -use std::{env, num::NonZeroUsize, thread}; +use std::{env, num::NonZero, thread}; pub fn get_concurrency() -> usize { if let Ok(value) = env::var("RUST_TEST_THREADS") { - match value.parse::().ok() { + match value.parse::>().ok() { Some(n) => n.get(), _ => panic!("RUST_TEST_THREADS is `{value}`, should be a positive integer."), } diff --git a/library/test/src/lib.rs b/library/test/src/lib.rs index da110f99248..728c73d8c50 100644 --- a/library/test/src/lib.rs +++ b/library/test/src/lib.rs @@ -17,6 +17,7 @@ #![unstable(feature = "test", issue = "50297")] #![doc(test(attr(deny(warnings))))] #![doc(rust_logo)] +#![feature(generic_nonzero)] #![feature(rustdoc_internals)] #![feature(internal_output_capture)] #![feature(staged_api)]