Skip to content

Commit

Permalink
Rollup merge of rust-lang#64481 - tomtau:fix/tls-error-message, r=Kod…
Browse files Browse the repository at this point in the history
…rAus

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!`.
  • Loading branch information
Centril authored Sep 24, 2019
2 parents 8f9ad07 + 68c3739 commit e8311f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libstd/thread/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit e8311f8

Please sign in to comment.