From f095f802dcd0f5ead14539c3f11985b4a3562912 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Thu, 16 Jun 2022 19:39:39 +0400 Subject: Move/rename `lazy::Sync{OnceCell,Lazy}` to `sync::{Once,Lazy}Lock` --- clippy_utils/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clippy_utils/src') diff --git a/clippy_utils/src/lib.rs b/clippy_utils/src/lib.rs index 0cf23ca626c..052d9756c51 100644 --- a/clippy_utils/src/lib.rs +++ b/clippy_utils/src/lib.rs @@ -62,7 +62,7 @@ pub use self::hir_utils::{both, count_eq, eq_expr_value, over, SpanlessEq, Spanl use std::collections::hash_map::Entry; use std::hash::BuildHasherDefault; -use std::lazy::SyncOnceCell; +use std::sync::OnceLock; use std::sync::{Mutex, MutexGuard}; use if_chain::if_chain; @@ -2078,7 +2078,7 @@ pub fn is_hir_ty_cfg_dependant(cx: &LateContext<'_>, ty: &hir::Ty<'_>) -> bool { false } -static TEST_ITEM_NAMES_CACHE: SyncOnceCell>>> = SyncOnceCell::new(); +static TEST_ITEM_NAMES_CACHE: OnceLock>>> = OnceLock::new(); fn with_test_item_names<'tcx>(tcx: TyCtxt<'tcx>, module: LocalDefId, f: impl Fn(&[Symbol]) -> bool) -> bool { let cache = TEST_ITEM_NAMES_CACHE.get_or_init(|| Mutex::new(FxHashMap::default())); -- cgit 1.4.1-3-g733a5