]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/cargo/mod.rs
Rollup merge of #89366 - GuillaumeGomez:remove-lazy-static, r=jyn514
[rust.git] / src / tools / clippy / tests / cargo / mod.rs
index a8f3e3145f64d723de26b9729b5375c21fd28a0b..4dbe71e4b6ad6ae032be2c43649c6deba8aecf37 100644 (file)
@@ -1,25 +1,3 @@
-use std::env;
-use std::lazy::SyncLazy;
-use std::path::PathBuf;
-
-pub static CARGO_TARGET_DIR: SyncLazy<PathBuf> = SyncLazy::new(|| match env::var_os("CARGO_TARGET_DIR") {
-    Some(v) => v.into(),
-    None => env::current_dir().unwrap().join("target"),
-});
-
-pub static TARGET_LIB: SyncLazy<PathBuf> = SyncLazy::new(|| {
-    if let Some(path) = option_env!("TARGET_LIBS") {
-        path.into()
-    } else {
-        let mut dir = CARGO_TARGET_DIR.clone();
-        if let Some(target) = env::var_os("CARGO_BUILD_TARGET") {
-            dir.push(target);
-        }
-        dir.push(env!("PROFILE"));
-        dir
-    }
-});
-
 #[must_use]
 pub fn is_rustc_test_suite() -> bool {
     option_env!("RUSTC_TEST_SUITE").is_some()