Skip to content

Commit b998cff

Browse files
committed
Use cfg!(windows)
1 parent 3d6cc60 commit b998cff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1678,7 +1678,7 @@ impl Build {
16781678
return;
16791679
}
16801680
if let Err(e) = fs::remove_file(dst) {
1681-
if e.kind() != io::ErrorKind::NotFound {
1681+
if cfg!(windows) && e.kind() != io::ErrorKind::NotFound {
16821682
// workaround for https://github.com/rust-lang/rust/issues/127126
16831683
// if removing the file fails, attempt to rename it instead.
16841684
let now = t!(SystemTime::now().duration_since(SystemTime::UNIX_EPOCH));

0 commit comments

Comments
 (0)