about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-08-15 17:13:21 +0200
committerJakub Beránek <berykubik@gmail.com>2025-08-16 08:56:41 +0200
commit5107ac92bbd6f9acd4adeef00ffeca02a4e73d04 (patch)
tree6f577fd680388047c0d4c646a4a4aa9ed46b60f8 /src
parent1ae7c4907275f10b3db9e886bc8809ec063e45ee (diff)
downloadrust-5107ac92bbd6f9acd4adeef00ffeca02a4e73d04.tar.gz
rust-5107ac92bbd6f9acd4adeef00ffeca02a4e73d04.zip
Do not call `fs::remove_file` in `cp_link_filtered_recurse`
The target is removed by `copy_link` too, so no need to duplicate the syscall.
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/src/lib.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
index 706a3cbb210..55e74f9e4d9 100644
--- a/src/bootstrap/src/lib.rs
+++ b/src/bootstrap/src/lib.rs
@@ -1862,7 +1862,6 @@ impl Build {
                     self.create_dir(&dst);
                     self.cp_link_filtered_recurse(&path, &dst, &relative, filter);
                 } else {
-                    let _ = fs::remove_file(&dst);
                     self.copy_link(&path, &dst, FileType::Regular);
                 }
             }