Add some assertions
This commit is contained in:
parent
486a38723b
commit
c4bcac628c
2 changed files with 3 additions and 0 deletions
|
@ -970,6 +970,7 @@ impl<K: DepKind> DepGraph<K> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn next_virtual_depnode_index(&self) -> DepNodeIndex {
|
pub(crate) fn next_virtual_depnode_index(&self) -> DepNodeIndex {
|
||||||
|
debug_assert!(self.data.is_none());
|
||||||
let index = self.virtual_dep_node_index.fetch_add(1, Relaxed);
|
let index = self.virtual_dep_node_index.fetch_add(1, Relaxed);
|
||||||
DepNodeIndex::from_u32(index)
|
DepNodeIndex::from_u32(index)
|
||||||
}
|
}
|
||||||
|
|
|
@ -429,6 +429,8 @@ where
|
||||||
Q: QueryConfig<Qcx>,
|
Q: QueryConfig<Qcx>,
|
||||||
Qcx: QueryContext,
|
Qcx: QueryContext,
|
||||||
{
|
{
|
||||||
|
debug_assert!(!qcx.dep_context().dep_graph().is_fully_enabled());
|
||||||
|
|
||||||
// Fingerprint the key, just to assert that it doesn't
|
// Fingerprint the key, just to assert that it doesn't
|
||||||
// have anything we don't consider hashable
|
// have anything we don't consider hashable
|
||||||
if cfg!(debug_assertions) {
|
if cfg!(debug_assertions) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue