Skip to content

Commit e8b2e7b

Browse files
committed
Assert there is no duplicate node.
1 parent 17d3308 commit e8b2e7b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

compiler/rustc_middle/src/hir/map/collector.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ fn insert_vec_map<K: Idx, V: Clone>(map: &mut IndexVec<K, Option<V>>, k: K, v: V
5252
if i >= len {
5353
map.extend(repeat(None).take(i - len + 1));
5454
}
55+
debug_assert!(map[k].is_none());
5556
map[k] = Some(v);
5657
}
5758

@@ -216,9 +217,7 @@ impl<'a, 'hir> NodeCollector<'a, 'hir> {
216217
// Overwrite the dummy hash with the real HIR owner hash.
217218
nodes.hash = hash;
218219

219-
// FIXME: feature(impl_trait_in_bindings) broken and trigger this assert
220-
//assert!(data.signature.is_none());
221-
220+
debug_assert!(data.signature.is_none());
222221
data.signature =
223222
Some(self.arena.alloc(Owner { parent: entry.parent, node: entry.node }));
224223
} else {

0 commit comments

Comments
 (0)