Skip to content

Commit 2736a2a

Browse files
committed
Allow duplicates for side effect nodes
1 parent 68fd771 commit 2736a2a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

compiler/rustc_query_system/src/dep_graph/serialized.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,16 @@ impl SerializedDepGraph {
253253

254254
for (idx, node) in nodes.iter_enumerated() {
255255
if index[node.kind.as_usize()].insert(node.hash, idx).is_some() {
256-
let name = deps.name(node.kind);
257-
panic!(
256+
// Side effect nodes can have duplicates
257+
if node.kind != D::DEP_KIND_SIDE_EFFECT {
258+
let name = deps.name(node.kind);
259+
panic!(
258260
"Error: A dep graph node ({name}) does not have an unique index. \
259261
Running a clean build on a nightly compiler with `-Z incremental-verify-ich` \
260262
can help narrow down the issue for reporting. A clean build may also work around the issue.\n
261263
DepNode: {node:?}"
262264
)
265+
}
263266
}
264267
}
265268

0 commit comments

Comments
 (0)