From 64805dab0432260d7e22276a98b6057af6c339c2 Mon Sep 17 00:00:00 2001 From: Jason Newcomb Date: Wed, 27 May 2026 11:48:50 -0400 Subject: [PATCH] Remove `PROFILE` forwarding from `build.rs` --- build.rs | 2 -- tests/integration.rs | 12 +----------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/build.rs b/build.rs index b79d09b0dd2d..4a28465c7715 100644 --- a/build.rs +++ b/build.rs @@ -1,6 +1,4 @@ fn main() { - // Forward the profile to the main compilation - println!("cargo:rustc-env=PROFILE={}", std::env::var("PROFILE").unwrap()); // Don't rebuild even if nothing changed println!("cargo:rerun-if-changed=build.rs"); rustc_tools_util::setup_version_info!(); diff --git a/tests/integration.rs b/tests/integration.rs index cb7d61eee24a..2cb82b8b380b 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -14,11 +14,6 @@ use std::env; use std::ffi::OsStr; use std::process::Command; -#[cfg(not(windows))] -const CARGO_CLIPPY: &str = "cargo-clippy"; -#[cfg(windows)] -const CARGO_CLIPPY: &str = "cargo-clippy.exe"; - #[cfg_attr(feature = "integration", test)] fn integration_test() { let repo_name = env::var("INTEGRATION").expect("`INTEGRATION` var not set"); @@ -44,14 +39,9 @@ fn integration_test() { .expect("unable to run git"); assert!(st.success()); - let root_dir = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")); - let target_dir = std::path::Path::new(&root_dir).join("target"); - let clippy_binary = target_dir.join(env!("PROFILE")).join(CARGO_CLIPPY); - - let output = Command::new(clippy_binary) + let output = Command::new(env!("CARGO_BIN_EXE_cargo-clippy")) .current_dir(repo_dir) .env("RUST_BACKTRACE", "full") - .env("CARGO_TARGET_DIR", target_dir) .args([ "clippy", "--all-targets",