Skip to content

Commit e8311f8

Browse files
authored
Rollup merge of rust-lang#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!`.
2 parents 8f9ad07 + 68c3739 commit e8311f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libstd/thread/local.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ impl<T: 'static> LocalKey<T> {
236236
#[stable(feature = "rust1", since = "1.0.0")]
237237
pub fn with<F, R>(&'static self, f: F) -> R
238238
where F: FnOnce(&T) -> R {
239-
self.try_with(f).expect("cannot access a TLS value during or \
240-
after it is destroyed")
239+
self.try_with(f).expect("cannot access a Thread Local Storage value \
240+
during or after destruction")
241241
}
242242

243243
/// Acquires a reference to the value in this TLS key.

0 commit comments

Comments
 (0)