Replace remaining instances of use of debug feature with debug_assertions.

Also fix some code that did not build in debug mode anymore (d'oh!) in
`src/ion/merges.rs`, as exposed by this change.
This commit is contained in:
Chris Fallin
2021-08-12 17:35:55 -07:00
parent 8ed83e3a57
commit 69ad31f013
2 changed files with 5 additions and 5 deletions

View File

@@ -48,16 +48,16 @@ impl<'a, F: Function> Env<'a, F> {
return false;
}
#[cfg(debug)]
#[cfg(debug_assertions)]
{
// Sanity check: both bundles should contain only ranges with appropriate VReg classes.
for entry in &self.bundles[from.index()].ranges {
let vreg = self.ranges[entry.index.index()].vreg;
assert_eq!(rc, self.vregs[vreg.index()].reg.class());
assert_eq!(from_rc, self.vreg_regs[vreg.index()].class());
}
for entry in &self.bundles[to.index()].ranges {
let vreg = self.ranges[entry.index.index()].vreg;
assert_eq!(rc, self.vregs[vreg.index()].reg.class());
assert_eq!(to_rc, self.vreg_regs[vreg.index()].class());
}
}