Skip to content

Commit 5e41ec2

Browse files
committed
rename other than copy/remove
1 parent 5de2a24 commit 5e41ec2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustc_driver/driver.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,10 +1084,9 @@ pub fn phase_5_run_llvm_passes(sess: &Session,
10841084
// are going to build an executable
10851085
if sess.opts.output_types.contains_key(&OutputType::Exe) {
10861086
let f = outputs.path(OutputType::Object);
1087-
fs::copy(&f,
1087+
fs::rename(&f,
10881088
f.with_file_name(format!("{}.0.o",
10891089
f.file_stem().unwrap().to_string_lossy()))).unwrap();
1090-
fs::remove_file(f).unwrap();
10911090
}
10921091

10931092
// Remove assembly source, unless --save-temps was specified

0 commit comments

Comments
 (0)