Skip to content

Commit 55bdbab

Browse files
committed
Add extra assertion.
1 parent 794741c commit 55bdbab

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

+4
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,10 @@ impl<D: Deps> DepGraphData<D> {
851851
) -> Option<DepNodeIndex> {
852852
let frame = MarkFrame { index: prev_dep_node_index, parent: frame };
853853

854+
#[cfg(not(parallel_compiler))]
855+
self.assert_nonexistent_node(dep_node, || {
856+
format!("trying to mark existing {dep_node:?} as green")
857+
});
854858
#[cfg(not(parallel_compiler))]
855859
debug_assert!(self.colors.get(prev_dep_node_index).is_none());
856860

0 commit comments

Comments
 (0)