Rollup merge of #129161 - dtolnay:spawnunck, r=Noratrieb

Stabilize std:🧵:Builder::spawn_unchecked

Closes #55132.
This commit is contained in:
Matthias Krüger 2024-08-16 19:59:00 +02:00 committed by GitHub
commit a9bf86a5f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 3 deletions

View File

@ -1,7 +1,6 @@
// tidy-alphabetical-start
#![feature(decl_macro)]
#![feature(let_chains)]
#![feature(thread_spawn_unchecked)]
#![feature(try_blocks)]
// tidy-alphabetical-end

View File

@ -412,7 +412,6 @@ impl Builder {
/// # Examples
///
/// ```
/// #![feature(thread_spawn_unchecked)]
/// use std::thread;
///
/// let builder = thread::Builder::new();
@ -433,7 +432,7 @@ impl Builder {
/// ```
///
/// [`io::Result`]: crate::io::Result
#[unstable(feature = "thread_spawn_unchecked", issue = "55132")]
#[stable(feature = "thread_spawn_unchecked", since = "CURRENT_RUSTC_VERSION")]
pub unsafe fn spawn_unchecked<F, T>(self, f: F) -> io::Result<JoinHandle<T>>
where
F: FnOnce() -> T,