Skip to content

Commit

Permalink
Rollup merge of #92632 - yoshuawuyts:stabilize-available-parallelism,…
Browse files Browse the repository at this point in the history
… r=joshtriplett

Implement stabilization of `#[feature(available_parallelism)]`

Stabilized in #74479 (comment). Closes #74479. Thanks!

cc/ ``@rust-lang/libs-api``
  • Loading branch information
ehuss committed Jan 8, 2022
2 parents 759b13e + 3632f41 commit 1001068
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions library/std/src/thread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,6 @@ fn _assert_sync_and_send() {
///
/// ```
/// # #![allow(dead_code)]
/// #![feature(available_parallelism)]
/// use std::{io, thread};
///
/// fn main() -> io::Result<()> {
Expand All @@ -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 = "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<NonZeroUsize> {
imp::available_parallelism()
}
1 change: 0 additions & 1 deletion library/test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 1001068

Please sign in to comment.