Skip to content

Commit 7f7a3cc

Browse files
committed
Rollup merge of #23296 - shepmaster:explain-why-joinguard-is-must-use, r=alexcrichton
2 parents 3d70c70 + ac6cd90 commit 7f7a3cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/thread.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ impl Drop for JoinHandle {
635635
/// Due to platform restrictions, it is not possible to `Clone` this
636636
/// handle: the ability to join a child thread is a uniquely-owned
637637
/// permission.
638-
#[must_use]
638+
#[must_use = "thread will be immediately joined if `JoinGuard` is not used"]
639639
#[stable(feature = "rust1", since = "1.0.0")]
640640
pub struct JoinGuard<'a, T: 'a> {
641641
inner: JoinInner<T>,

0 commit comments

Comments
 (0)