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) {
348348 // Create a stub .d file to stop Cargo from "rebuilding" the crate:
349349 // https://github.com/rust-lang/miri/issues/1724#issuecomment-787115693
350350 // 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" ,
354354 get_arg_flag_value( "--crate-name" ) . unwrap( ) ,
355355 get_arg_flag_value( "extra-filename" ) . unwrap_or_default( ) ,
356- ) ;
356+ ) ) ;
357357 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+ ) ;
359362 }
360363 File :: create ( dep_info_name) . expect ( "failed to create fake .d file" ) ;
361364 }
You can’t perform that action at this time.
0 commit comments