2022-01-13 06:18:19 -06:00
|
|
|
#![allow(dead_code)] // see https://github.com/rust-lang/rust/issues/46379
|
|
|
|
|
|
|
|
use std::path::PathBuf;
|
2022-06-16 10:39:39 -05:00
|
|
|
use std::sync::LazyLock;
|
2022-01-13 06:18:19 -06:00
|
|
|
|
2022-06-16 10:39:39 -05:00
|
|
|
pub static CARGO_CLIPPY_PATH: LazyLock<PathBuf> = LazyLock::new(|| {
|
2022-01-13 06:18:19 -06:00
|
|
|
let mut path = std::env::current_exe().unwrap();
|
2023-02-18 13:18:52 -06:00
|
|
|
assert!(path.pop()); // deps
|
2022-01-13 06:18:19 -06:00
|
|
|
path.set_file_name("cargo-clippy");
|
|
|
|
path
|
|
|
|
});
|
|
|
|
|
|
|
|
pub const IS_RUSTC_TEST_SUITE: bool = option_env!("RUSTC_TEST_SUITE").is_some();
|