From ac6cd90af1fa784cc9f8ad976e27b6d0a844f211 Mon Sep 17 00:00:00 2001 From: Jake Goulding Date: Wed, 11 Mar 2015 20:10:52 -0400 Subject: [PATCH] Explain why immediately dropping a JoinGuard is not what you want to do --- src/libstd/thread.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstd/thread.rs b/src/libstd/thread.rs index 7d0df679591..4c7dcc8b9eb 100644 --- a/src/libstd/thread.rs +++ b/src/libstd/thread.rs @@ -635,7 +635,7 @@ impl Drop for JoinHandle { /// Due to platform restrictions, it is not possible to `Clone` this /// handle: the ability to join a child thread is a uniquely-owned /// permission. -#[must_use] +#[must_use = "thread will be immediately joined if `JoinGuard` is not used"] #[stable(feature = "rust1", since = "1.0.0")] pub struct JoinGuard<'a, T: 'a> { inner: JoinInner,