We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fbd34ef commit a365287Copy full SHA for a365287
src/librustc_incremental/persist/fs.rs
@@ -886,7 +886,10 @@ fn safe_remove_dir_all(p: &Path) -> io::Result<()> {
886
fn safe_remove_file(p: &Path) -> io::Result<()> {
887
if p.exists() {
888
let canonicalized = p.canonicalize()?;
889
- std_fs::remove_file(canonicalized)
+ match std_fs::remove_file(canonicalized) {
890
+ Err(ref err) if err.kind() == io::ErrorKind::NotFound => Ok(()),
891
+ result => result,
892
+ }
893
} else {
894
Ok(())
895
}
0 commit comments