Allow duplicates for side effect nodes
This commit is contained in:
parent
68fd771bc1
commit
2736a2a84f
1 changed files with 5 additions and 2 deletions
|
@ -253,6 +253,8 @@ impl SerializedDepGraph {
|
||||||
|
|
||||||
for (idx, node) in nodes.iter_enumerated() {
|
for (idx, node) in nodes.iter_enumerated() {
|
||||||
if index[node.kind.as_usize()].insert(node.hash, idx).is_some() {
|
if index[node.kind.as_usize()].insert(node.hash, idx).is_some() {
|
||||||
|
// Side effect nodes can have duplicates
|
||||||
|
if node.kind != D::DEP_KIND_SIDE_EFFECT {
|
||||||
let name = deps.name(node.kind);
|
let name = deps.name(node.kind);
|
||||||
panic!(
|
panic!(
|
||||||
"Error: A dep graph node ({name}) does not have an unique index. \
|
"Error: A dep graph node ({name}) does not have an unique index. \
|
||||||
|
@ -262,6 +264,7 @@ impl SerializedDepGraph {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Arc::new(SerializedDepGraph {
|
Arc::new(SerializedDepGraph {
|
||||||
nodes,
|
nodes,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue