about summary refs log tree commit diff
path: root/src/libstd/thread
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-10-18 18:07:22 +0000
committerbors <bors@rust-lang.org>2017-10-18 18:07:22 +0000
commitb7960878ba77124505aabe7dc99d0a898354c326 (patch)
tree18092cf34d1e37672c93c1237cc641adecbf8801 /src/libstd/thread
parentfc208bb62ce83e18c990d23b67366a3ec4f21532 (diff)
parent6b505d6a3ff22ca65bf63358040e2e5bab197604 (diff)
downloadrust-b7960878ba77124505aabe7dc99d0a898354c326.tar.gz
rust-b7960878ba77124505aabe7dc99d0a898354c326.zip
Auto merge of #45368 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests

- Successful merges: #44138, #45082, #45098, #45181, #45217, #45281, #45325, #45326, #45340, #45354
- Failed merges:
Diffstat (limited to 'src/libstd/thread')
-rw-r--r--src/libstd/thread/local.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs
index a53c76a333a..cb18eed8ee5 100644
--- a/src/libstd/thread/local.rs
+++ b/src/libstd/thread/local.rs
@@ -325,7 +325,10 @@ impl<T: 'static> LocalKey<T> {
     ///
     /// Once the initialization expression succeeds, the key transitions to the
     /// `Valid` state which will guarantee that future calls to [`with`] will
-    /// succeed within the thread.
+    /// succeed within the thread. Some keys might skip the `Uninitialized`
+    /// state altogether and start in the `Valid` state as an optimization
+    /// (e.g. keys initialized with a constant expression), but no guarantees
+    /// are made.
     ///
     /// When a thread exits, each key will be destroyed in turn, and as keys are
     /// destroyed they will enter the `Destroyed` state just before the