Skip to content

Commit d1586fc

Browse files
committed
Fix unused sync::atomic import on targets without atomics
1 parent 96ecaa1 commit d1586fc

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

library/core/src/panic/unwind_safe.rs

+14-15
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use crate::ops::{Deref, DerefMut};
55
use crate::pin::Pin;
66
use crate::ptr::{NonNull, Unique};
77
use crate::stream::Stream;
8-
use crate::sync::atomic;
98
use crate::task::{Context, Poll};
109

1110
/// A marker trait which represents "panic safe" types in Rust.
@@ -204,49 +203,49 @@ impl<T> RefUnwindSafe for AssertUnwindSafe<T> {}
204203

205204
#[cfg(target_has_atomic_load_store = "ptr")]
206205
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
207-
impl RefUnwindSafe for atomic::AtomicIsize {}
206+
impl RefUnwindSafe for crate::sync::atomic::AtomicIsize {}
208207
#[cfg(target_has_atomic_load_store = "8")]
209208
#[stable(feature = "integer_atomics_stable", since = "1.34.0")]
210-
impl RefUnwindSafe for atomic::AtomicI8 {}
209+
impl RefUnwindSafe for crate::sync::atomic::AtomicI8 {}
211210
#[cfg(target_has_atomic_load_store = "16")]
212211
#[stable(feature = "integer_atomics_stable", since = "1.34.0")]
213-
impl RefUnwindSafe for atomic::AtomicI16 {}
212+
impl RefUnwindSafe for crate::sync::atomic::AtomicI16 {}
214213
#[cfg(target_has_atomic_load_store = "32")]
215214
#[stable(feature = "integer_atomics_stable", since = "1.34.0")]
216-
impl RefUnwindSafe for atomic::AtomicI32 {}
215+
impl RefUnwindSafe for crate::sync::atomic::AtomicI32 {}
217216
#[cfg(target_has_atomic_load_store = "64")]
218217
#[stable(feature = "integer_atomics_stable", since = "1.34.0")]
219-
impl RefUnwindSafe for atomic::AtomicI64 {}
218+
impl RefUnwindSafe for crate::sync::atomic::AtomicI64 {}
220219
#[cfg(target_has_atomic_load_store = "128")]
221220
#[unstable(feature = "integer_atomics", issue = "32976")]
222-
impl RefUnwindSafe for atomic::AtomicI128 {}
221+
impl RefUnwindSafe for crate::sync::atomic::AtomicI128 {}
223222

224223
#[cfg(target_has_atomic_load_store = "ptr")]
225224
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
226-
impl RefUnwindSafe for atomic::AtomicUsize {}
225+
impl RefUnwindSafe for crate::sync::atomic::AtomicUsize {}
227226
#[cfg(target_has_atomic_load_store = "8")]
228227
#[stable(feature = "integer_atomics_stable", since = "1.34.0")]
229-
impl RefUnwindSafe for atomic::AtomicU8 {}
228+
impl RefUnwindSafe for crate::sync::atomic::AtomicU8 {}
230229
#[cfg(target_has_atomic_load_store = "16")]
231230
#[stable(feature = "integer_atomics_stable", since = "1.34.0")]
232-
impl RefUnwindSafe for atomic::AtomicU16 {}
231+
impl RefUnwindSafe for crate::sync::atomic::AtomicU16 {}
233232
#[cfg(target_has_atomic_load_store = "32")]
234233
#[stable(feature = "integer_atomics_stable", since = "1.34.0")]
235-
impl RefUnwindSafe for atomic::AtomicU32 {}
234+
impl RefUnwindSafe for crate::sync::atomic::AtomicU32 {}
236235
#[cfg(target_has_atomic_load_store = "64")]
237236
#[stable(feature = "integer_atomics_stable", since = "1.34.0")]
238-
impl RefUnwindSafe for atomic::AtomicU64 {}
237+
impl RefUnwindSafe for crate::sync::atomic::AtomicU64 {}
239238
#[cfg(target_has_atomic_load_store = "128")]
240239
#[unstable(feature = "integer_atomics", issue = "32976")]
241-
impl RefUnwindSafe for atomic::AtomicU128 {}
240+
impl RefUnwindSafe for crate::sync::atomic::AtomicU128 {}
242241

243242
#[cfg(target_has_atomic_load_store = "8")]
244243
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
245-
impl RefUnwindSafe for atomic::AtomicBool {}
244+
impl RefUnwindSafe for crate::sync::atomic::AtomicBool {}
246245

247246
#[cfg(target_has_atomic_load_store = "ptr")]
248247
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
249-
impl<T> RefUnwindSafe for atomic::AtomicPtr<T> {}
248+
impl<T> RefUnwindSafe for crate::sync::atomic::AtomicPtr<T> {}
250249

251250
#[stable(feature = "catch_unwind", since = "1.9.0")]
252251
impl<T> Deref for AssertUnwindSafe<T> {

0 commit comments

Comments
 (0)