This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
src/tools/miri/cargo-miri/src Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -348,14 +348,17 @@ pub fn phase_rustc(mut args: impl Iterator<Item = String>, phase: RustcPhase) {
348
348
// Create a stub .d file to stop Cargo from "rebuilding" the crate:
349
349
// https://github.com/rust-lang/miri/issues/1724#issuecomment-787115693
350
350
// As we store a JSON file instead of building the crate here, an empty file is fine.
351
- let dep_info_name = format ! (
352
- "{}/{}{}.d" ,
353
- get_arg_flag_value ( "--out-dir" ) . unwrap ( ) ,
351
+ let mut dep_info_name = PathBuf :: from ( get_arg_flag_value ( "--out-dir" ) . unwrap ( ) ) ;
352
+ dep_info_name . push ( format ! (
353
+ "{}{}.d" ,
354
354
get_arg_flag_value( "--crate-name" ) . unwrap( ) ,
355
355
get_arg_flag_value( "extra-filename" ) . unwrap_or_default( ) ,
356
- ) ;
356
+ ) ) ;
357
357
if verbose > 0 {
358
- eprintln ! ( "[cargo-miri rustc] writing stub dep-info to `{dep_info_name}`" ) ;
358
+ eprintln ! (
359
+ "[cargo-miri rustc] writing stub dep-info to `{}`" ,
360
+ dep_info_name. display( )
361
+ ) ;
359
362
}
360
363
File :: create ( dep_info_name) . expect ( "failed to create fake .d file" ) ;
361
364
}
You can’t perform that action at this time.
0 commit comments