File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -491,8 +491,6 @@ impl OutputFilenames {
491
491
/// Like temp_path, but also supports things where there is no corresponding
492
492
/// OutputType, like noopt-bitcode or lto-bitcode.
493
493
pub fn temp_path_ext ( & self , ext : & str , codegen_unit_name : Option < & str > ) -> PathBuf {
494
- let base = self . out_directory . join ( & self . filestem ) ;
495
-
496
494
let mut extension = String :: new ( ) ;
497
495
498
496
if let Some ( codegen_unit_name) = codegen_unit_name {
@@ -509,11 +507,13 @@ impl OutputFilenames {
509
507
extension. push_str ( ext) ;
510
508
}
511
509
512
- base . with_extension ( extension)
510
+ self . with_extension ( & extension)
513
511
}
514
512
515
513
pub fn with_extension ( & self , extension : & str ) -> PathBuf {
516
- self . out_directory . join ( & self . filestem ) . with_extension ( extension)
514
+ let mut path = self . out_directory . join ( & self . filestem ) ;
515
+ path. set_extension ( extension) ;
516
+ path
517
517
}
518
518
}
519
519
You can’t perform that action at this time.
0 commit comments