diff --git a/src/librustc/dep_graph/graph.rs b/src/librustc/dep_graph/graph.rs index 0fb4e354a52..c5d36a6bb6a 100644 --- a/src/librustc/dep_graph/graph.rs +++ b/src/librustc/dep_graph/graph.rs @@ -328,7 +328,12 @@ impl DepGraph { } pub fn fingerprint_of(&self, dep_node: &DepNode) -> Fingerprint { - self.fingerprints.borrow()[dep_node] + match self.fingerprints.borrow().get(dep_node) { + Some(&fingerprint) => fingerprint, + None => { + bug!("Could not find current fingerprint for {:?}", dep_node) + } + } } pub fn prev_fingerprint_of(&self, dep_node: &DepNode) -> Option {