Skip to content

Commit 6a36594

Browse files
incr.comp.: Improve error message for unknown fingerprint.
1 parent 6c1529b commit 6a36594

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/librustc/dep_graph/graph.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,12 @@ impl DepGraph {
328328
}
329329

330330
pub fn fingerprint_of(&self, dep_node: &DepNode) -> Fingerprint {
331-
self.fingerprints.borrow()[dep_node]
331+
match self.fingerprints.borrow().get(dep_node) {
332+
Some(&fingerprint) => fingerprint,
333+
None => {
334+
bug!("Could not find current fingerprint for {:?}", dep_node)
335+
}
336+
}
332337
}
333338

334339
pub fn prev_fingerprint_of(&self, dep_node: &DepNode) -> Option<Fingerprint> {

0 commit comments

Comments
 (0)