From dd418ac07a54600c699b2ef00e39f4a6761b7be2 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 6 Apr 2024 22:01:22 +0200 Subject: [PATCH] MIRI_REPLACE_LIBRS_IF_NOT_TEST: also apply to crates.io crates --- cargo-miri/src/phases.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cargo-miri/src/phases.rs b/cargo-miri/src/phases.rs index 3f6c484a05..04f3b2918b 100644 --- a/cargo-miri/src/phases.rs +++ b/cargo-miri/src/phases.rs @@ -454,15 +454,10 @@ pub fn phase_rustc(mut args: impl Iterator, phase: RustcPhase) { continue; } // If the REPLACE_LIBRS hack is enabled and we are building a `lib.rs` file, and a - // `lib.miri.rs` file exists, then build that instead. We only consider relative paths - // as cargo uses those for files in the workspace; dependencies from crates.io get - // absolute paths. + // `lib.miri.rs` file exists, then build that instead. if replace_librs { let path = Path::new(&arg); - if path.is_relative() - && path.file_name().is_some_and(|f| f == "lib.rs") - && path.is_file() - { + if path.file_name().is_some_and(|f| f == "lib.rs") && path.is_file() { let miri_rs = Path::new(&arg).with_extension("miri.rs"); if miri_rs.is_file() { if verbose > 0 {