about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2022-06-16 19:39:39 +0400
committerMaybe Waffle <waffle.lapkin@gmail.com>2022-06-16 19:54:42 +0400
commitc1a2db3372a4d6896744919284f3287650a38ab7 (patch)
tree636b2ff560a6dc628c5cec1440db82210b73dee5 /compiler/rustc_data_structures/src
parent7c360dc117d554a11f7193505da0835c4b890c6f (diff)
downloadrust-c1a2db3372a4d6896744919284f3287650a38ab7.tar.gz
rust-c1a2db3372a4d6896744919284f3287650a38ab7.zip
Move/rename `lazy::Sync{OnceCell,Lazy}` to `sync::{Once,Lazy}Lock`
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/jobserver.rs4
-rw-r--r--compiler/rustc_data_structures/src/sync.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_data_structures/src/jobserver.rs b/compiler/rustc_data_structures/src/jobserver.rs
index 41605afb44e..09baa3095a4 100644
--- a/compiler/rustc_data_structures/src/jobserver.rs
+++ b/compiler/rustc_data_structures/src/jobserver.rs
@@ -1,5 +1,5 @@
 pub use jobserver_crate::Client;
-use std::lazy::SyncLazy;
+use std::sync::LazyLock;
 
 // We can only call `from_env` once per process
 
@@ -18,7 +18,7 @@ use std::lazy::SyncLazy;
 // Also note that we stick this in a global because there could be
 // multiple rustc instances in this process, and the jobserver is
 // per-process.
-static GLOBAL_CLIENT: SyncLazy<Client> = SyncLazy::new(|| unsafe {
+static GLOBAL_CLIENT: LazyLock<Client> = LazyLock::new(|| unsafe {
     Client::from_env().unwrap_or_else(|| {
         let client = Client::new(32).expect("failed to create jobserver");
         // Acquire a token for the main thread which we can release later
diff --git a/compiler/rustc_data_structures/src/sync.rs b/compiler/rustc_data_structures/src/sync.rs
index ec3d3d49bcb..feb82cb0938 100644
--- a/compiler/rustc_data_structures/src/sync.rs
+++ b/compiler/rustc_data_structures/src/sync.rs
@@ -258,7 +258,7 @@ cfg_if! {
         pub use parking_lot::MutexGuard as LockGuard;
         pub use parking_lot::MappedMutexGuard as MappedLockGuard;
 
-        pub use std::lazy::SyncOnceCell as OnceCell;
+        pub use std::sync::OnceLock as OnceCell;
 
         pub use std::sync::atomic::{AtomicBool, AtomicUsize, AtomicU32, AtomicU64};