From 3632f41c78eb848f0ffae6bc347b27f7cf3eeda7 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Fri, 7 Jan 2022 01:04:37 +0100 Subject: [PATCH] Stabilize `#[feature(available_parallelism)]` --- library/std/src/thread/mod.rs | 3 +-- library/test/src/lib.rs | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs index 9f7f10d0d00..ae4b65871ec 100644 --- a/library/std/src/thread/mod.rs +++ b/library/std/src/thread/mod.rs @@ -1504,7 +1504,6 @@ fn _assert_both() {} /// /// ``` /// # #![allow(dead_code)] -/// #![feature(available_parallelism)] /// use std::{io, thread}; /// /// fn main() -> io::Result<()> { @@ -1516,7 +1515,7 @@ fn _assert_both() {} #[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 = "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 { imp::available_parallelism() } diff --git a/library/test/src/lib.rs b/library/test/src/lib.rs index 608e587cf34..fad83094cdf 100644 --- a/library/test/src/lib.rs +++ b/library/test/src/lib.rs @@ -16,7 +16,6 @@ #![unstable(feature = "test", issue = "50297")] #![doc(test(attr(deny(warnings))))] #![feature(nll)] -#![feature(available_parallelism)] #![feature(bench_black_box)] #![feature(internal_output_capture)] #![feature(staged_api)]