@@ -18,7 +18,7 @@ use ops::{Deref, DerefMut};
1818use panicking;
1919use ptr:: { Unique , Shared } ;
2020use rc:: Rc ;
21- use sync:: { Arc , Mutex , RwLock } ;
21+ use sync:: { Arc , Mutex , RwLock , atomic } ;
2222use thread:: Result ;
2323
2424#[ stable( feature = "panic_hooks" , since = "1.10.0" ) ]
@@ -231,6 +231,46 @@ impl<T: ?Sized> RefUnwindSafe for Mutex<T> {}
231231#[ stable( feature = "unwind_safe_lock_refs" , since = "1.12.0" ) ]
232232impl < T : ?Sized > RefUnwindSafe for RwLock < T > { }
233233
234+ #[ cfg( target_has_atomic = "ptr" ) ]
235+ #[ stable( feature = "unwind_safe_atomic_refs" , since = "1.14.0" ) ]
236+ impl RefUnwindSafe for atomic:: AtomicIsize { }
237+ #[ cfg( target_has_atomic = "8" ) ]
238+ #[ unstable( feature = "integer_atomics" , issue = "32976" ) ]
239+ impl RefUnwindSafe for atomic:: AtomicI8 { }
240+ #[ cfg( target_has_atomic = "16" ) ]
241+ #[ unstable( feature = "integer_atomics" , issue = "32976" ) ]
242+ impl RefUnwindSafe for atomic:: AtomicI16 { }
243+ #[ cfg( target_has_atomic = "32" ) ]
244+ #[ unstable( feature = "integer_atomics" , issue = "32976" ) ]
245+ impl RefUnwindSafe for atomic:: AtomicI32 { }
246+ #[ cfg( target_has_atomic = "64" ) ]
247+ #[ unstable( feature = "integer_atomics" , issue = "32976" ) ]
248+ impl RefUnwindSafe for atomic:: AtomicI64 { }
249+
250+ #[ cfg( target_has_atomic = "ptr" ) ]
251+ #[ stable( feature = "unwind_safe_atomic_refs" , since = "1.14.0" ) ]
252+ impl RefUnwindSafe for atomic:: AtomicUsize { }
253+ #[ cfg( target_has_atomic = "8" ) ]
254+ #[ unstable( feature = "integer_atomics" , issue = "32976" ) ]
255+ impl RefUnwindSafe for atomic:: AtomicU8 { }
256+ #[ cfg( target_has_atomic = "16" ) ]
257+ #[ unstable( feature = "integer_atomics" , issue = "32976" ) ]
258+ impl RefUnwindSafe for atomic:: AtomicU16 { }
259+ #[ cfg( target_has_atomic = "32" ) ]
260+ #[ unstable( feature = "integer_atomics" , issue = "32976" ) ]
261+ impl RefUnwindSafe for atomic:: AtomicU32 { }
262+ #[ cfg( target_has_atomic = "64" ) ]
263+ #[ unstable( feature = "integer_atomics" , issue = "32976" ) ]
264+ impl RefUnwindSafe for atomic:: AtomicU64 { }
265+
266+ #[ cfg( target_has_atomic = "8" ) ]
267+ #[ stable( feature = "unwind_safe_atomic_refs" , since = "1.14.0" ) ]
268+ impl RefUnwindSafe for atomic:: AtomicBool { }
269+
270+ #[ cfg( target_has_atomic = "ptr" ) ]
271+ #[ stable( feature = "unwind_safe_atomic_refs" , since = "1.14.0" ) ]
272+ impl < T > RefUnwindSafe for atomic:: AtomicPtr < T > { }
273+
234274#[ stable( feature = "catch_unwind" , since = "1.9.0" ) ]
235275impl < T > Deref for AssertUnwindSafe < T > {
236276 type Target = T ;
0 commit comments