about summary refs log tree commit diff
path: root/library/std/src/sync/reentrant_lock.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/sync/reentrant_lock.rs')
-rw-r--r--library/std/src/sync/reentrant_lock.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/library/std/src/sync/reentrant_lock.rs b/library/std/src/sync/reentrant_lock.rs
index 727252f03a2..4140718560c 100644
--- a/library/std/src/sync/reentrant_lock.rs
+++ b/library/std/src/sync/reentrant_lock.rs
@@ -1,5 +1,3 @@
-use cfg_if::cfg_if;
-
 use crate::cell::UnsafeCell;
 use crate::fmt;
 use crate::ops::Deref;
@@ -87,8 +85,8 @@ pub struct ReentrantLock<T: ?Sized> {
     data: T,
 }
 
-cfg_if!(
-    if #[cfg(target_has_atomic = "64")] {
+cfg_select!(
+    target_has_atomic = "64" => {
         use crate::sync::atomic::{Atomic, AtomicU64, Ordering::Relaxed};
 
         struct Tid(Atomic<u64>);
@@ -110,7 +108,8 @@ cfg_if!(
                 self.0.store(value, Relaxed);
             }
         }
-    } else {
+    }
+    _ => {
         /// Returns the address of a TLS variable. This is guaranteed to
         /// be unique across all currently alive threads.
         fn tls_addr() -> usize {