Skip to content

Commit 003b169

Browse files
Add error message when not finding the ICH of a DepNode.
1 parent 195c42c commit 003b169

File tree

1 file changed

+6
-1
lines changed
  • src/librustc_incremental/calculate_svh

1 file changed

+6
-1
lines changed

src/librustc_incremental/calculate_svh/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,12 @@ impl<'a> ::std::ops::Index<&'a DepNode<DefId>> for IncrementalHashesMap {
8888
type Output = Fingerprint;
8989

9090
fn index(&self, index: &'a DepNode<DefId>) -> &Fingerprint {
91-
&self.hashes[index]
91+
match self.hashes.get(index) {
92+
Some(fingerprint) => fingerprint,
93+
None => {
94+
bug!("Could not find ICH for {:?}", index);
95+
}
96+
}
9297
}
9398
}
9499

0 commit comments

Comments
 (0)