Skip to content

Commit 8f684c9

Browse files
committed
compiler/rustc_data_structures/src/sync.rs: delete Weak
1 parent c9c7b44 commit 8f684c9

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

compiler/rustc_data_structures/src/sync.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
//!
1919
//! | Type | Serial version | Parallel version |
2020
//! | ----------------------- | ------------------- | ------------------------------- |
21-
//! |` Weak<T>` | `rc::Weak<T>` | `sync::Weak<T>` |
2221
//! | `LRef<'a, T>` [^2] | `&'a mut T` | `&'a T` |
2322
//! | | | |
2423
//! | `AtomicBool` | `Cell<bool>` | `atomic::AtomicBool` |
@@ -104,11 +103,11 @@ mod mode {
104103
// FIXME(parallel_compiler): Get rid of these aliases across the compiler.
105104

106105
pub use std::marker::{Send, Sync};
106+
pub use std::sync::OnceLock;
107107
// Use portable AtomicU64 for targets without native 64-bit atomics
108108
#[cfg(target_has_atomic = "64")]
109109
pub use std::sync::atomic::AtomicU64;
110110
pub use std::sync::atomic::{AtomicBool, AtomicU32, AtomicUsize};
111-
pub use std::sync::{OnceLock, Weak};
112111

113112
pub use mode::{is_dyn_thread_safe, set_dyn_thread_safe_mode};
114113
pub use parking_lot::{

src/doc/rustc-dev-guide/src/parallel-rustc.md

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ are implemented differently depending on whether `parallel-compiler` is true.
4646

4747
| data structure | parallel | non-parallel |
4848
| -------------------------------- | --------------------------------------------------- | ------------ |
49-
| Weak | std::sync::Weak | std::rc::Weak |
5049
| Atomic{Bool}/{Usize}/{U32}/{U64} | std::sync::atomic::Atomic{Bool}/{Usize}/{U32}/{U64} | (std::cell::Cell<bool/usize/u32/u64>) |
5150
| OnceCell | std::sync::OnceLock | std::cell::OnceCell |
5251
| Lock\<T> | (parking_lot::Mutex\<T>) | (std::cell::RefCell) |

0 commit comments

Comments
 (0)