We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c805ce commit d6c3196Copy full SHA for d6c3196
src/libstd/thread/local.rs
@@ -2,6 +2,7 @@
2
3
#![unstable(feature = "thread_local_internals", issue = "0")]
4
5
+use crate::error::Error;
6
use crate::fmt;
7
8
/// A thread local storage key which owns its contents.
@@ -189,6 +190,7 @@ macro_rules! __thread_local_inner {
189
190
191
/// An error returned by [`LocalKey::try_with`](struct.LocalKey.html#method.try_with).
192
#[stable(feature = "thread_local_try_with", since = "1.26.0")]
193
+#[derive(Clone, Copy, Eq, PartialEq)]
194
pub struct AccessError {
195
_private: (),
196
}
@@ -207,6 +209,8 @@ impl fmt::Display for AccessError {
207
209
208
210
211
212
+impl Error for AccessError {}
213
+
214
impl<T: 'static> LocalKey<T> {
215
#[doc(hidden)]
216
#[unstable(feature = "thread_local_internals",
0 commit comments