about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo.net>2016-11-15 11:55:34 -0500
committerMichael Woerister <michaelwoerister@posteo.net>2016-11-18 16:45:17 -0500
commit003b1699c0044aef757c9c32df13a529fd4c485b (patch)
tree2f5027888a51f7bf6f7466f12a967b538af97813
parent195c42c426456e0aa1fe1a8f620e25c9c295754d (diff)
downloadrust-003b1699c0044aef757c9c32df13a529fd4c485b.tar.gz
rust-003b1699c0044aef757c9c32df13a529fd4c485b.zip
Add error message when not finding the ICH of a DepNode.
-rw-r--r--src/librustc_incremental/calculate_svh/mod.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/librustc_incremental/calculate_svh/mod.rs b/src/librustc_incremental/calculate_svh/mod.rs
index c08519090d2..0339f488272 100644
--- a/src/librustc_incremental/calculate_svh/mod.rs
+++ b/src/librustc_incremental/calculate_svh/mod.rs
@@ -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);
+            }
+        }
     }
 }