Skip to content

Commit 6ac9d94

Browse files
committed
Replace assertion
1 parent 1b8f032 commit 6ac9d94

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

chalk-solve/src/coherence.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ impl<I: Interner> SpecializationPriorities<I> {
6161
/// Store the priority of an impl (used during construction).
6262
/// Panics if we have already stored the priority for this impl.
6363
fn insert(&mut self, impl_id: ImplId<I>, p: SpecializationPriority) {
64-
self.map.insert(impl_id, p);
64+
let old_value = self.map.insert(impl_id, p);
65+
assert!(old_value.is_none());
6566
}
6667
}
6768

0 commit comments

Comments
 (0)