diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-03-30 13:00:28 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-03-30 21:14:43 +1100 |
| commit | 0ccb60096ac8d166c740ff1180ba33b5f7421c8f (patch) | |
| tree | 6f3777d0905831aed00c56da458e407537a42178 | |
| parent | eeb5b782a613b37c13bfd39588a3e3ae6dcf0ff5 (diff) | |
| download | rust-0ccb60096ac8d166c740ff1180ba33b5f7421c8f.tar.gz rust-0ccb60096ac8d166c740ff1180ba33b5f7421c8f.zip | |
Remove `RwLock::clone_guard`.
It's unused.
| -rw-r--r-- | compiler/rustc_data_structures/src/sync.rs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/compiler/rustc_data_structures/src/sync.rs b/compiler/rustc_data_structures/src/sync.rs index 09765607cbd..4e2126fff7b 100644 --- a/compiler/rustc_data_structures/src/sync.rs +++ b/compiler/rustc_data_structures/src/sync.rs @@ -580,18 +580,6 @@ impl<T> RwLock<T> { #[cfg(not(parallel_compiler))] #[inline(always)] - pub fn clone_guard<'a>(rg: &ReadGuard<'a, T>) -> ReadGuard<'a, T> { - ReadGuard::clone(rg) - } - - #[cfg(parallel_compiler)] - #[inline(always)] - pub fn clone_guard<'a>(rg: &ReadGuard<'a, T>) -> ReadGuard<'a, T> { - ReadGuard::rwlock(&rg).read() - } - - #[cfg(not(parallel_compiler))] - #[inline(always)] pub fn leak(&self) -> &T { ReadGuard::leak(self.read()) } |
