diff options
| author | Jake Goulding <jake.goulding@gmail.com> | 2015-03-11 20:10:52 -0400 |
|---|---|---|
| committer | Jake Goulding <jake.goulding@gmail.com> | 2015-03-11 20:10:52 -0400 |
| commit | ac6cd90af1fa784cc9f8ad976e27b6d0a844f211 (patch) | |
| tree | a19dcf52786cf8ad256741f9c78315280a7e72a8 | |
| parent | cfea8ec41699e25c8fb524d625190f0cb860dc71 (diff) | |
| download | rust-ac6cd90af1fa784cc9f8ad976e27b6d0a844f211.tar.gz rust-ac6cd90af1fa784cc9f8ad976e27b6d0a844f211.zip | |
Explain why immediately dropping a JoinGuard is not what you want to do
| -rw-r--r-- | src/libstd/thread.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<T>, |
