mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
fix(fingerprint): explicit reason than "stale; unknown reason"
This was discovered during playing with rmeta reuse between cargo-check and cargo-build
This commit is contained in:
parent
64a1246070
commit
c6f5f3fcae
@ -1167,15 +1167,12 @@ impl Fingerprint {
|
||||
// minimum mtime as it's the one we'll be comparing to inputs and
|
||||
// dependencies.
|
||||
for output in self.outputs.iter() {
|
||||
let mtime = match paths::mtime(output) {
|
||||
Ok(mtime) => mtime,
|
||||
|
||||
let Ok(mtime) = paths::mtime(output) else {
|
||||
// This path failed to report its `mtime`. It probably doesn't
|
||||
// exists, so leave ourselves as stale and bail out.
|
||||
Err(e) => {
|
||||
debug!("failed to get mtime of {:?}: {}", output, e);
|
||||
return Ok(());
|
||||
}
|
||||
let item = StaleItem::FailedToReadMetadata(output.clone());
|
||||
self.fs_status = FsStatus::StaleItem(item);
|
||||
return Ok(());
|
||||
};
|
||||
assert!(mtimes.insert(output.clone(), mtime).is_none());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user