Skip to content

Commit 2563fbe

Browse files
committed
Don't claim LocalKey::with prevents a reference to be sent across threads
1 parent da14081 commit 2563fbe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/std/src/thread/local.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ use crate::fmt;
1818
/// target platform. It is instantiated with the [`thread_local!`] macro and the
1919
/// primary method is the [`with`] method.
2020
///
21-
/// The [`with`] method yields a reference to the contained value which cannot be
22-
/// sent across threads or escape the given closure.
21+
/// The [`with`] method yields a reference to the contained value which cannot
22+
/// outlive the current thread or escape the given closure.
2323
///
2424
/// [`thread_local!`]: crate::thread_local
2525
///

0 commit comments

Comments
 (0)