mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 07:22:42 +00:00
Rollup merge of #89789 - jkugelman:must-use-thread-builder, r=joshtriplett
Add #[must_use] to thread::Builder I copied the wording of the [`fmt::Debug` builders](https://doc.rust-lang.org/src/core/fmt/builders.rs.html#444). Affects: ```rust std/src/thread/mod.rs:289:5 std:🧵:Builder fn new() -> Builder; std/src/thread/mod.rs:318:5 std:🧵:Builder fn name(mut self, name: String) -> Builder; std/src/thread/mod.rs:341:5 std:🧵:Builder fn stack_size(mut self, size: usize) -> Builder; ``` Parent issue: #89692 r? `@joshtriplett`
This commit is contained in:
commit
d872d7fd00
@ -257,6 +257,7 @@ pub const fn require_unstable_const_init_thread_local() {}
|
||||
/// [`unwrap`]: crate::result::Result::unwrap
|
||||
/// [naming-threads]: ./index.html#naming-threads
|
||||
/// [stack-size]: ./index.html#stack-size
|
||||
#[must_use = "must eventually spawn the thread"]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[derive(Debug)]
|
||||
pub struct Builder {
|
||||
|
Loading…
Reference in New Issue
Block a user