Rollup merge of #92632 - yoshuawuyts:stabilize-available-parallelism, r=joshtriplett
Implement stabilization of `#[feature(available_parallelism)]` Stabilized in https://github.com/rust-lang/rust/issues/74479#issuecomment-984379800. Closes https://github.com/rust-lang/rust/issues/74479. Thanks! cc/ ``@rust-lang/libs-api``
This commit is contained in:
commit
10010685a9
@ -1504,7 +1504,6 @@ fn _assert_both<T: Send + Sync>() {}
|
||||
///
|
||||
/// ```
|
||||
/// # #![allow(dead_code)]
|
||||
/// #![feature(available_parallelism)]
|
||||
/// use std::{io, thread};
|
||||
///
|
||||
/// fn main() -> io::Result<()> {
|
||||
@ -1516,7 +1515,7 @@ fn _assert_both<T: Send + Sync>() {}
|
||||
#[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()
|
||||
}
|
||||
|
@ -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)]
|
||||
|
Loading…
Reference in New Issue
Block a user