Skip to content

Commit

Permalink
Use cfg!(windows)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisDenton committed Jul 2, 2024
1 parent 3d6cc60 commit b998cff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bootstrap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1678,7 +1678,7 @@ impl Build {
return;
}
if let Err(e) = fs::remove_file(dst) {
if e.kind() != io::ErrorKind::NotFound {
if cfg!(windows) && e.kind() != io::ErrorKind::NotFound {
// workaround for https://github.com/rust-lang/rust/issues/127126
// if removing the file fails, attempt to rename it instead.
let now = t!(SystemTime::now().duration_since(SystemTime::UNIX_EPOCH));
Expand Down

0 comments on commit b998cff

Please sign in to comment.