about summary refs log tree commit diff
path: root/src/libstd/thread
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-09-25 03:48:26 +0200
committerGitHub <noreply@github.com>2019-09-25 03:48:26 +0200
commitbc3afb76bbc25379255ae50d6768b8ac31c59c33 (patch)
tree9139562f4d8de5ae724f3324352bb50245fcf811 /src/libstd/thread
parent0204f364418dbcc3a200141ad91c06049983d337 (diff)
parent68c3739f1268e496c096d89ab9e556f196e35974 (diff)
downloadrust-bc3afb76bbc25379255ae50d6768b8ac31c59c33.tar.gz
rust-bc3afb76bbc25379255ae50d6768b8ac31c59c33.zip
Rollup merge of #64481 - tomtau:fix/tls-error-message, r=KodrAus
A more explanatory thread local storage panic message

Outside rust-std internals, TLS is usually understood as Transport Layer Security, so the existing message could be a bit puzzling when one has TLS sessions in `thread_local!`.
Diffstat (limited to 'src/libstd/thread')
-rw-r--r--src/libstd/thread/local.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs
index f85b5d632f1..e92c0d1c58e 100644
--- a/src/libstd/thread/local.rs
+++ b/src/libstd/thread/local.rs
@@ -236,8 +236,8 @@ impl<T: 'static> LocalKey<T> {
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn with<F, R>(&'static self, f: F) -> R
                       where F: FnOnce(&T) -> R {
-        self.try_with(f).expect("cannot access a TLS value during or \
-                                 after it is destroyed")
+        self.try_with(f).expect("cannot access a Thread Local Storage value \
+                                 during or after destruction")
     }
 
     /// Acquires a reference to the value in this TLS key.