about summary refs log tree commit diff
path: root/compiler/rustc_query_system/src
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2025-03-18 22:30:43 +0100
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2025-03-19 20:12:37 +0100
commit2736a2a84f972baabe4012f890aaae14489af8d9 (patch)
treeebf3c5297e73db461d2de0adb6b51ff915f6cfcf /compiler/rustc_query_system/src
parent68fd771bc1f186bfa7e825d8a87ac8f06a6efced (diff)
downloadrust-2736a2a84f972baabe4012f890aaae14489af8d9.tar.gz
rust-2736a2a84f972baabe4012f890aaae14489af8d9.zip
Allow duplicates for side effect nodes
Diffstat (limited to 'compiler/rustc_query_system/src')
-rw-r--r--compiler/rustc_query_system/src/dep_graph/serialized.rs7
1 files 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:?}"
                 )
+                }
             }
         }