Skip to content

Commit 92e83c0

Browse files
committed
fixes for unrevert
1 parent 54d48fb commit 92e83c0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/lib.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -344,20 +344,20 @@ mod serde;
344344
#[cfg(feature = "kv_unstable")]
345345
pub mod kv;
346346

347-
#[cfg(has_atomics)]
347+
#[cfg(target_has_atomic = "ptr")]
348348
use std::sync::atomic::{AtomicUsize, Ordering};
349349

350-
#[cfg(not(has_atomics))]
350+
#[cfg(not(target_has_atomic = "ptr"))]
351351
use std::cell::Cell;
352-
#[cfg(not(has_atomics))]
352+
#[cfg(not(target_has_atomic = "ptr"))]
353353
use std::sync::atomic::Ordering;
354354

355-
#[cfg(not(has_atomics))]
355+
#[cfg(not(target_has_atomic = "ptr"))]
356356
struct AtomicUsize {
357357
v: Cell<usize>,
358358
}
359359

360-
#[cfg(not(has_atomics))]
360+
#[cfg(not(target_has_atomic = "ptr"))]
361361
impl AtomicUsize {
362362
const fn new(v: usize) -> AtomicUsize {
363363
AtomicUsize { v: Cell::new(v) }
@@ -389,7 +389,7 @@ impl AtomicUsize {
389389

390390
// Any platform without atomics is unlikely to have multiple cores, so
391391
// writing via Cell will not be a race condition.
392-
#[cfg(not(has_atomics))]
392+
#[cfg(not(target_has_atomic = "ptr"))]
393393
unsafe impl Sync for AtomicUsize {}
394394

395395
// The LOGGER static holds a pointer to the global logger. It is protected by

0 commit comments

Comments
 (0)