Add error message when not finding the ICH of a DepNode.

This commit is contained in:
Michael Woerister 2016-11-15 11:55:34 -05:00
parent 195c42c426
commit 003b1699c0

View File

@ -88,7 +88,12 @@ impl<'a> ::std::ops::Index<&'a DepNode<DefId>> for IncrementalHashesMap {
type Output = Fingerprint;
fn index(&self, index: &'a DepNode<DefId>) -> &Fingerprint {
&self.hashes[index]
match self.hashes.get(index) {
Some(fingerprint) => fingerprint,
None => {
bug!("Could not find ICH for {:?}", index);
}
}
}
}