File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 22
33#![ unstable( feature = "thread_local_internals" , issue = "0" ) ]
44
5+ use crate :: error:: Error ;
56use crate :: fmt;
67
78/// A thread local storage key which owns its contents.
@@ -189,6 +190,7 @@ macro_rules! __thread_local_inner {
189190
190191/// An error returned by [`LocalKey::try_with`](struct.LocalKey.html#method.try_with).
191192#[ stable( feature = "thread_local_try_with" , since = "1.26.0" ) ]
193+ #[ derive( Clone , Copy , Eq , PartialEq ) ]
192194pub struct AccessError {
193195 _private : ( ) ,
194196}
@@ -207,6 +209,9 @@ impl fmt::Display for AccessError {
207209 }
208210}
209211
212+ #[ stable( feature = "thread_local_try_with" , since = "1.26.0" ) ]
213+ impl Error for AccessError { }
214+
210215impl < T : ' static > LocalKey < T > {
211216 #[ doc( hidden) ]
212217 #[ unstable( feature = "thread_local_internals" ,
You can’t perform that action at this time.
0 commit comments