summary refs log tree commit diff
path: root/library/std/src/thread
diff options
context:
space:
mode:
authorGiacomo Stevanato <giaco.stevanato@gmail.com>2023-04-07 14:54:50 +0200
committerGiacomo Stevanato <giaco.stevanato@gmail.com>2023-04-07 14:57:50 +0200
commit2563fbeab31def56b66cbdebd7bb0b7e5efbecb8 (patch)
treef5ae897668bfa794e8a079981d55fbf5ed4eea1a /library/std/src/thread
parentda140814682407ee326d36f5256bc883899a7388 (diff)
downloadrust-2563fbeab31def56b66cbdebd7bb0b7e5efbecb8.tar.gz
rust-2563fbeab31def56b66cbdebd7bb0b7e5efbecb8.zip
Don't claim LocalKey::with prevents a reference to be sent across threads
Diffstat (limited to 'library/std/src/thread')
-rw-r--r--library/std/src/thread/local.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/thread/local.rs b/library/std/src/thread/local.rs
index 7fdf03acc14..f07d6406d4d 100644
--- a/library/std/src/thread/local.rs
+++ b/library/std/src/thread/local.rs
@@ -18,8 +18,8 @@ use crate::fmt;
 /// target platform. It is instantiated with the [`thread_local!`] macro and the
 /// primary method is the [`with`] method.
 ///
-/// The [`with`] method yields a reference to the contained value which cannot be
-/// sent across threads or escape the given closure.
+/// The [`with`] method yields a reference to the contained value which cannot
+/// outlive the current thread or escape the given closure.
 ///
 /// [`thread_local!`]: crate::thread_local
 ///