Skip to content

Commit 4f1f671

Browse files
committed
don't panic in dep_node_debug_str if self.data is None
1 parent 6d049fb commit 4f1f671

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/dep_graph/graph.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ impl DepGraph {
227227
}
228228

229229
pub(super) fn dep_node_debug_str(&self, dep_node: DepNode) -> Option<String> {
230-
self.data.as_ref().unwrap().dep_node_debug.borrow().get(&dep_node).cloned()
230+
self.data.as_ref().and_then(|t| t.dep_node_debug.borrow().get(&dep_node).cloned())
231231
}
232232
}
233233

0 commit comments

Comments
 (0)