]> git.lizzy.rs Git - rust.git/commitdiff
Add #[must_use] to thread::Builder
authorJohn Kugelman <john@kugelman.name>
Mon, 11 Oct 2021 21:25:47 +0000 (17:25 -0400)
committerJohn Kugelman <john@kugelman.name>
Mon, 11 Oct 2021 21:25:47 +0000 (17:25 -0400)
library/std/src/thread/mod.rs

index 7d404aff30e0792bde572ebb70ccd2f3c12e378b..f141546b6460ddf8d0cf0118f6431f9a535ee871 100644 (file)
@@ -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 call `spawn()` on Thread builders"]
 #[stable(feature = "rust1", since = "1.0.0")]
 #[derive(Debug)]
 pub struct Builder {