mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Stabilize #[feature(available_parallelism)]
This commit is contained in:
parent
cfa4ac66c1
commit
3632f41c78
@ -1504,7 +1504,6 @@ fn _assert_sync_and_send() {
|
||||
///
|
||||
/// ```
|
||||
/// # #![allow(dead_code)]
|
||||
/// #![feature(available_parallelism)]
|
||||
/// use std::{io, thread};
|
||||
///
|
||||
/// 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 = "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