about summary refs log tree commit diff
path: root/src/bootstrap/cache.rs
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2021-12-26 14:25:39 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2022-01-01 16:53:47 +0100
commit2fe2728fa900a708d2c70342d9d6737e5462cf5d (patch)
treec064feebd291e73afc7f6979ef7d54452de85b45 /src/bootstrap/cache.rs
parent028c6f1454787c068ff5117e9000a1de4fd98374 (diff)
downloadrust-2fe2728fa900a708d2c70342d9d6737e5462cf5d.tar.gz
rust-2fe2728fa900a708d2c70342d9d6737e5462cf5d.zip
Remove the lazy_static dependency from rustbuild
Rustbuild already depends on once_cell which in the future can be
replaced with std::lazy::Lazy.
Diffstat (limited to 'src/bootstrap/cache.rs')
-rw-r--r--src/bootstrap/cache.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/bootstrap/cache.rs b/src/bootstrap/cache.rs
index 0c16fae01bc..fac5d8db511 100644
--- a/src/bootstrap/cache.rs
+++ b/src/bootstrap/cache.rs
@@ -13,7 +13,8 @@ use std::ops::Deref;
 use std::path::{Path, PathBuf};
 use std::sync::Mutex;
 
-use lazy_static::lazy_static;
+// FIXME: replace with std::lazy after it gets stabilized and reaches beta
+use once_cell::sync::Lazy;
 
 use crate::builder::Step;
 
@@ -222,9 +223,7 @@ impl Interner {
     }
 }
 
-lazy_static! {
-    pub static ref INTERNER: Interner = Interner::default();
-}
+pub static INTERNER: Lazy<Interner> = Lazy::new(Interner::default);
 
 /// This is essentially a `HashMap` which allows storing any type in its input and
 /// any type in its output. It is a write-once cache; values are never evicted,