Skip to content

Commit 7bf114a

Browse files
committed
Add extra assertion.
1 parent 6894f3d commit 7bf114a

File tree

1 file changed

+4
-0
lines changed
  • compiler/rustc_query_system/src/dep_graph

1 file changed

+4
-0
lines changed

compiler/rustc_query_system/src/dep_graph/graph.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,10 @@ impl<K: DepKind> DepGraphData<K> {
864864
) -> Option<DepNodeIndex> {
865865
let frame = MarkFrame { index: prev_dep_node_index, parent: frame };
866866

867+
#[cfg(not(parallel_compiler))]
868+
self.assert_nonexistent_node(dep_node, || {
869+
format!("trying to mark existing {dep_node:?} as green")
870+
});
867871
#[cfg(not(parallel_compiler))]
868872
debug_assert!(self.colors.get(prev_dep_node_index).is_none());
869873

0 commit comments

Comments
 (0)