We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
cfg!(windows)
1 parent 3d6cc60 commit b998cffCopy full SHA for b998cff
src/bootstrap/src/lib.rs
@@ -1678,7 +1678,7 @@ impl Build {
1678
return;
1679
}
1680
if let Err(e) = fs::remove_file(dst) {
1681
- if e.kind() != io::ErrorKind::NotFound {
+ if cfg!(windows) && e.kind() != io::ErrorKind::NotFound {
1682
// workaround for https://github.com/rust-lang/rust/issues/127126
1683
// if removing the file fails, attempt to rename it instead.
1684
let now = t!(SystemTime::now().duration_since(SystemTime::UNIX_EPOCH));
0 commit comments