diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2025-03-03 20:17:26 +1100 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2025-03-03 20:20:24 +1100 |
| commit | 32c5449d4523452f2a1d11f57f04997d4fb36592 (patch) | |
| tree | 8a7618deee5292c041c3a232537f818b240f1bb7 /compiler/rustc_data_structures/src | |
| parent | 5afd12239af03b4944429a2f5be10357f0044e89 (diff) | |
| download | rust-32c5449d4523452f2a1d11f57f04997d4fb36592.tar.gz rust-32c5449d4523452f2a1d11f57f04997d4fb36592.zip | |
Remove some unnecessary aliases from `rustc_data_structures::sync`
With the removal of `cfg(parallel_compiler)`, these are always shared references and `std::sync::OnceLock`.
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/sync.rs | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/compiler/rustc_data_structures/src/sync.rs b/compiler/rustc_data_structures/src/sync.rs index 37b54fe38ff..524f6b67d02 100644 --- a/compiler/rustc_data_structures/src/sync.rs +++ b/compiler/rustc_data_structures/src/sync.rs @@ -18,21 +18,16 @@ //! //! | Type | Serial version | Parallel version | //! | ----------------------- | ------------------- | ------------------------------- | -//! | `LRef<'a, T>` [^2] | `&'a mut T` | `&'a T` | -//! | | | | //! | `Lock<T>` | `RefCell<T>` | `RefCell<T>` or | //! | | | `parking_lot::Mutex<T>` | //! | `RwLock<T>` | `RefCell<T>` | `parking_lot::RwLock<T>` | //! | `MTLock<T>` [^1] | `T` | `Lock<T>` | -//! | `MTLockRef<'a, T>` [^2] | `&'a mut MTLock<T>` | `&'a MTLock<T>` | //! | | | | //! | `ParallelIterator` | `Iterator` | `rayon::iter::ParallelIterator` | //! //! [^1]: `MTLock` is similar to `Lock`, but the serial version avoids the cost //! of a `RefCell`. This is appropriate when interior mutability is not //! required. -//! -//! [^2]: `MTRef`, `MTLockRef` are type aliases. use std::collections::HashMap; use std::hash::{BuildHasher, Hash}; @@ -97,7 +92,6 @@ mod mode { // FIXME(parallel_compiler): Get rid of these aliases across the compiler. -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; @@ -110,8 +104,6 @@ pub use parking_lot::{ #[cfg(not(target_has_atomic = "64"))] pub use portable_atomic::AtomicU64; -pub type LRef<'a, T> = &'a T; - #[derive(Debug, Default)] pub struct MTLock<T>(Lock<T>); @@ -148,8 +140,6 @@ use parking_lot::RwLock as InnerRwLock; /// It is only useful when you are running in a single thread const ERROR_CHECKING: bool = false; -pub type MTLockRef<'a, T> = LRef<'a, MTLock<T>>; - #[derive(Default)] #[repr(align(64))] pub struct CacheAligned<T>(pub T); |
