about summary refs log tree commit diff
path: root/src/libstd/macros.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/macros.rs')
-rw-r--r--src/libstd/macros.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs
index d96441e09a8..092430bf082 100644
--- a/src/libstd/macros.rs
+++ b/src/libstd/macros.rs
@@ -303,8 +303,8 @@ macro_rules! try {
 /// # fn long_running_task() {}
 /// # fn calculate_the_answer() -> int { 42i }
 ///
-/// Thread::spawn(move|| { long_running_task(); tx1.send(()) }).detach();
-/// Thread::spawn(move|| { tx2.send(calculate_the_answer()) }).detach();
+/// Thread::spawn(move|| { long_running_task(); tx1.send(()).unwrap(); });
+/// Thread::spawn(move|| { tx2.send(calculate_the_answer()).unwrap(); });
 ///
 /// select! (
 ///     _ = rx1.recv() => println!("the long running task finished first"),