diff options
| author | bors <bors@rust-lang.org> | 2019-08-05 15:30:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-08-05 15:30:40 +0000 |
| commit | f6ecdc2f61b96de199be956cad853a7c02bcfb58 (patch) | |
| tree | 70e4db7c26300bb564f8b57c421645111807f6a4 /src | |
| parent | 4be067558962c004b638e4c6f162d50f7c0c98b6 (diff) | |
| parent | d2c9c125460ae019c04594dbbe5f204db6add70d (diff) | |
| download | rust-f6ecdc2f61b96de199be956cad853a7c02bcfb58.tar.gz rust-f6ecdc2f61b96de199be956cad853a7c02bcfb58.zip | |
Auto merge of #61491 - stjepang:impls-for-accesserror, r=dtolnay
Add a few trait impls for AccessError
Diffstat (limited to 'src')
| -rw-r--r-- | src/libstd/thread/local.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs index 9b355aa2023..f85b5d632f1 100644 --- a/src/libstd/thread/local.rs +++ b/src/libstd/thread/local.rs @@ -2,6 +2,7 @@ #![unstable(feature = "thread_local_internals", issue = "0")] +use crate::error::Error; use crate::fmt; /// A thread local storage key which owns its contents. @@ -189,6 +190,7 @@ macro_rules! __thread_local_inner { /// An error returned by [`LocalKey::try_with`](struct.LocalKey.html#method.try_with). #[stable(feature = "thread_local_try_with", since = "1.26.0")] +#[derive(Clone, Copy, Eq, PartialEq)] pub struct AccessError { _private: (), } @@ -207,6 +209,9 @@ impl fmt::Display for AccessError { } } +#[stable(feature = "thread_local_try_with", since = "1.26.0")] +impl Error for AccessError {} + impl<T: 'static> LocalKey<T> { #[doc(hidden)] #[unstable(feature = "thread_local_internals", |
