diff options
| author | Askar Safin <safinaskar@mail.ru> | 2025-02-11 08:57:36 +0300 |
|---|---|---|
| committer | Askar Safin <safinaskar@mail.ru> | 2025-02-11 08:57:36 +0300 |
| commit | 4a2c7f48b52fe9ecb34d3e406b12a99ba8de4042 (patch) | |
| tree | 88ec90f1c763cda49b2279f9a203e2dc002783cb /compiler/rustc_data_structures/src | |
| parent | 8f684c9db7092d8a0c924ba63b967db021ab9860 (diff) | |
compiler/rustc_data_structures/src/sync.rs: remove atomics, but not AtomicU64!
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/sync.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_data_structures/src/sync/freeze.rs | 4 |
2 files changed, 2 insertions, 8 deletions
diff --git a/compiler/rustc_data_structures/src/sync.rs b/compiler/rustc_data_structures/src/sync.rs index 37f2e1f096e..e93a0891f0a 100644 --- a/compiler/rustc_data_structures/src/sync.rs +++ b/compiler/rustc_data_structures/src/sync.rs @@ -20,11 +20,6 @@ //! | ----------------------- | ------------------- | ------------------------------- | //! | `LRef<'a, T>` [^2] | `&'a mut T` | `&'a T` | //! | | | | -//! | `AtomicBool` | `Cell<bool>` | `atomic::AtomicBool` | -//! | `AtomicU32` | `Cell<u32>` | `atomic::AtomicU32` | -//! | `AtomicU64` | `Cell<u64>` | `atomic::AtomicU64` | -//! | `AtomicUsize` | `Cell<usize>` | `atomic::AtomicUsize` | -//! | | | | //! | `Lock<T>` | `RefCell<T>` | `RefCell<T>` or | //! | | | `parking_lot::Mutex<T>` | //! | `RwLock<T>` | `RefCell<T>` | `parking_lot::RwLock<T>` | @@ -107,7 +102,6 @@ pub use std::sync::OnceLock; // Use portable AtomicU64 for targets without native 64-bit atomics #[cfg(target_has_atomic = "64")] pub use std::sync::atomic::AtomicU64; -pub use std::sync::atomic::{AtomicBool, AtomicU32, AtomicUsize}; pub use mode::{is_dyn_thread_safe, set_dyn_thread_safe_mode}; pub use parking_lot::{ diff --git a/compiler/rustc_data_structures/src/sync/freeze.rs b/compiler/rustc_data_structures/src/sync/freeze.rs index 5236c9fe156..9720b22ea7d 100644 --- a/compiler/rustc_data_structures/src/sync/freeze.rs +++ b/compiler/rustc_data_structures/src/sync/freeze.rs @@ -3,9 +3,9 @@ use std::intrinsics::likely; use std::marker::PhantomData; use std::ops::{Deref, DerefMut}; use std::ptr::NonNull; -use std::sync::atomic::Ordering; +use std::sync::atomic::{AtomicBool, Ordering}; -use crate::sync::{AtomicBool, DynSend, DynSync, ReadGuard, RwLock, WriteGuard}; +use crate::sync::{DynSend, DynSync, ReadGuard, RwLock, WriteGuard}; /// A type which allows mutation using a lock until /// the value is frozen and can be accessed lock-free. |
