From 0ccb60096ac8d166c740ff1180ba33b5f7421c8f Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 30 Mar 2023 13:00:28 +1100 Subject: Remove `RwLock::clone_guard`. It's unused. --- compiler/rustc_data_structures/src/sync.rs | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'compiler/rustc_data_structures/src') 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 @@ -578,18 +578,6 @@ impl RwLock { self.write() } - #[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 { -- cgit 1.4.1-3-g733a5