Auto merge of #18829 - bholley:verify_in_drop, r=Manishearth

Verify in DiagnosticHashMap::drop

This will let us reason better about the drop_in_place crashes.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18829)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-10-11 13:53:01 -05:00 committed by GitHub
commit 882b22b606

View file

@ -209,7 +209,9 @@ impl<K: Hash + Eq, V, S: BuildHasher> Drop for DiagnosticHashMap<K, V, S>
S: BuildHasher
{
fn drop(&mut self) {
self.map.verify();
debug_assert!(self.readonly, "Dropped while mutating");
self.verify();
}
}