Rust compiler checks if file exists before writing it for removal in codegen output
@@ -107,11 +107,13 @@ impl ArtifactWriter for ArtifactDifferenceWriter {
}
fn remove(&self, path: PathBuf) -> BuildProjectResult {
+ if path.exists() {
self.codegen_records
.lock()
.unwrap()
.removed
.push(ArtifactDeletionRecord { path });
+ }
Ok(())
}
