Files
rust/tests/test_utils/mod.rs
T
Jacob Adam 94554413c0 Fix the compile-test tests when setting Cargo's build.build-dir setting to a path that's distinct from target-dir
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.
2026-02-24 10:21:39 +01:00

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();