Don't claim LocalKey::with prevents a reference to be sent across threads

This commit is contained in:
Giacomo Stevanato 2023-04-07 14:54:50 +02:00
parent da14081468
commit 2563fbeab3

View File

@ -18,8 +18,8 @@ use crate::fmt;
/// target platform. It is instantiated with the [`thread_local!`] macro and the /// target platform. It is instantiated with the [`thread_local!`] macro and the
/// primary method is the [`with`] method. /// primary method is the [`with`] method.
/// ///
/// The [`with`] method yields a reference to the contained value which cannot be /// The [`with`] method yields a reference to the contained value which cannot
/// sent across threads or escape the given closure. /// outlive the current thread or escape the given closure.
/// ///
/// [`thread_local!`]: crate::thread_local /// [`thread_local!`]: crate::thread_local
/// ///