mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-23 02:27:39 +03:00
94554413c0
In this approach, we're using the `CARGO_BIN_EXE_clippy-driver` env var, which is set to the appropriate absolute path, invariant across the various possible `target-dir` and `build.build-dir` configurations. Do the same for `CARGO_CLIPPY_PATH` in tests/test_utils/mod.rs.
9 lines
327 B
Rust
9 lines
327 B
Rust
#![allow(dead_code)] // see https://github.com/rust-lang/rust/issues/46379
|
|
|
|
use std::path::PathBuf;
|
|
use std::sync::LazyLock;
|
|
|
|
pub static CARGO_CLIPPY_PATH: LazyLock<PathBuf> = LazyLock::new(|| PathBuf::from(env!("CARGO_BIN_EXE_cargo-clippy")));
|
|
|
|
pub const IS_RUSTC_TEST_SUITE: bool = option_env!("RUSTC_TEST_SUITE").is_some();
|