Skip to content

Commit

Permalink
Made a thread local storage panic message more explanatory
Browse files Browse the repository at this point in the history
(TLS is usually understood as Transport Layer Security
outside rust-std internals)
  • Loading branch information
tomtau committed Sep 15, 2019
1 parent 572d3d9 commit df7789c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libstd/thread/local.rs
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 it is destroyed")
}

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

0 comments on commit df7789c

Please sign in to comment.