Stabilize #[feature(available_parallelism)]

This commit is contained in:
Yoshua Wuyts 2022-01-07 01:04:37 +01:00
parent cfa4ac66c1
commit 3632f41c78
2 changed files with 1 additions and 3 deletions

View file

@ -1504,7 +1504,6 @@ fn _assert_sync_and_send() {
/// ///
/// ``` /// ```
/// # #![allow(dead_code)] /// # #![allow(dead_code)]
/// #![feature(available_parallelism)]
/// use std::{io, thread}; /// use std::{io, thread};
/// ///
/// fn main() -> io::Result<()> { /// fn main() -> io::Result<()> {
@ -1516,7 +1515,7 @@ fn _assert_sync_and_send() {
#[doc(alias = "available_concurrency")] // Alias for a previous name we gave this API on unstable. #[doc(alias = "available_concurrency")] // Alias for a previous name we gave this API on unstable.
#[doc(alias = "hardware_concurrency")] // Alias for C++ `std::thread::hardware_concurrency`. #[doc(alias = "hardware_concurrency")] // Alias for C++ `std::thread::hardware_concurrency`.
#[doc(alias = "num_cpus")] // Alias for a popular ecosystem crate which provides similar functionality. #[doc(alias = "num_cpus")] // Alias for a popular ecosystem crate which provides similar functionality.
#[unstable(feature = "available_parallelism", issue = "74479")] #[stable(feature = "available_parallelism", since = "1.59.0")]
pub fn available_parallelism() -> io::Result<NonZeroUsize> { pub fn available_parallelism() -> io::Result<NonZeroUsize> {
imp::available_parallelism() imp::available_parallelism()
} }

View file

@ -16,7 +16,6 @@
#![unstable(feature = "test", issue = "50297")] #![unstable(feature = "test", issue = "50297")]
#![doc(test(attr(deny(warnings))))] #![doc(test(attr(deny(warnings))))]
#![feature(nll)] #![feature(nll)]
#![feature(available_parallelism)]
#![feature(bench_black_box)] #![feature(bench_black_box)]
#![feature(internal_output_capture)] #![feature(internal_output_capture)]
#![feature(staged_api)] #![feature(staged_api)]