Skip to content

Commit 264aa3a

Browse files
committed
Link edges after adding a node too
1 parent ddde5c6 commit 264aa3a

File tree

1 file changed

+1
-0
lines changed
  • compiler/rustc_data_structures/src/graph/linked_graph

1 file changed

+1
-0
lines changed

compiler/rustc_data_structures/src/graph/linked_graph/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ impl<I: Idx, N, E> LinkedGraph<I, N, E> {
130130
pub fn add_node(&mut self, idx: I, data: N) {
131131
let old = self.nodes.insert(idx, Node::new(data));
132132
debug_assert!(old.is_none());
133+
self.link_edges();
133134
}
134135

135136
pub fn mut_node_data(&mut self, idx: I) -> &mut N {

0 commit comments

Comments
 (0)