From 2736a2a84f972baabe4012f890aaae14489af8d9 Mon Sep 17 00:00:00 2001 From: John Kåre Alsaker Date: Tue, 18 Mar 2025 22:30:43 +0100 Subject: Allow duplicates for side effect nodes --- compiler/rustc_query_system/src/dep_graph/serialized.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_query_system/src/dep_graph/serialized.rs b/compiler/rustc_query_system/src/dep_graph/serialized.rs index c96a5804772..f4b2cf631ed 100644 --- a/compiler/rustc_query_system/src/dep_graph/serialized.rs +++ b/compiler/rustc_query_system/src/dep_graph/serialized.rs @@ -253,13 +253,16 @@ impl SerializedDepGraph { for (idx, node) in nodes.iter_enumerated() { if index[node.kind.as_usize()].insert(node.hash, idx).is_some() { - let name = deps.name(node.kind); - panic!( + // Side effect nodes can have duplicates + if node.kind != D::DEP_KIND_SIDE_EFFECT { + let name = deps.name(node.kind); + panic!( "Error: A dep graph node ({name}) does not have an unique index. \ Running a clean build on a nightly compiler with `-Z incremental-verify-ich` \ can help narrow down the issue for reporting. A clean build may also work around the issue.\n DepNode: {node:?}" ) + } } } -- cgit 1.4.1-3-g733a5