@@ -18,7 +18,7 @@ use ops::{Deref, DerefMut};
18
18
use panicking;
19
19
use ptr:: { Unique , Shared } ;
20
20
use rc:: Rc ;
21
- use sync:: { Arc , Mutex , RwLock } ;
21
+ use sync:: { Arc , Mutex , RwLock , atomic } ;
22
22
use thread:: Result ;
23
23
24
24
#[ stable( feature = "panic_hooks" , since = "1.10.0" ) ]
@@ -231,6 +231,46 @@ impl<T: ?Sized> RefUnwindSafe for Mutex<T> {}
231
231
#[ stable( feature = "unwind_safe_lock_refs" , since = "1.12.0" ) ]
232
232
impl < T : ?Sized > RefUnwindSafe for RwLock < T > { }
233
233
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
+
234
274
#[ stable( feature = "catch_unwind" , since = "1.9.0" ) ]
235
275
impl < T > Deref for AssertUnwindSafe < T > {
236
276
type Target = T ;
0 commit comments