Skip to content

Commit

Permalink
don't panic in dep_node_debug_str if self.data is None
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Jul 10, 2017
1 parent 6d049fb commit 4f1f671
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc/dep_graph/graph.rs
Expand Up @@ -227,7 +227,7 @@ impl DepGraph {
}

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

Expand Down

0 comments on commit 4f1f671

Please sign in to comment.