File tree 1 file changed +5
-0
lines changed
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
#![ unstable( feature = "thread_local_internals" , issue = "0" ) ]
4
4
5
+ use crate :: error:: Error ;
5
6
use crate :: fmt;
6
7
7
8
/// A thread local storage key which owns its contents.
@@ -189,6 +190,7 @@ macro_rules! __thread_local_inner {
189
190
190
191
/// An error returned by [`LocalKey::try_with`](struct.LocalKey.html#method.try_with).
191
192
#[ stable( feature = "thread_local_try_with" , since = "1.26.0" ) ]
193
+ #[ derive( Clone , Copy , Eq , PartialEq ) ]
192
194
pub struct AccessError {
193
195
_private : ( ) ,
194
196
}
@@ -207,6 +209,9 @@ impl fmt::Display for AccessError {
207
209
}
208
210
}
209
211
212
+ #[ stable( feature = "thread_local_try_with" , since = "1.26.0" ) ]
213
+ impl Error for AccessError { }
214
+
210
215
impl < T : ' static > LocalKey < T > {
211
216
#[ doc( hidden) ]
212
217
#[ unstable( feature = "thread_local_internals" ,
You can’t perform that action at this time.
0 commit comments