Check for duplicate dep nodes when creating the index
This commit is contained in:
parent
cdbf19a6fb
commit
bd8b628262
1 changed files with 8 additions and 1 deletions
|
@ -252,7 +252,14 @@ impl SerializedDepGraph {
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
for (idx, node) in nodes.iter_enumerated() {
|
for (idx, node) in nodes.iter_enumerated() {
|
||||||
index[node.kind.as_usize()].insert(node.hash, idx);
|
if index[node.kind.as_usize()].insert(node.hash, idx).is_some() {
|
||||||
|
panic!(
|
||||||
|
"Error: A dep graph node 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:?}"
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Arc::new(SerializedDepGraph {
|
Arc::new(SerializedDepGraph {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue