refactor(semantic): fix dead code warning in release mode (#5728)

`Counts::assert_accurate` is only used in debug mode. Silence the dead code warning in release mode.
This commit is contained in:
overlookmotel 2024-09-12 13:33:57 +00:00
parent 3ce8546393
commit 6436524ff1

View file

@ -30,7 +30,7 @@ impl Counts {
counts
}
#[cfg(debug_assertions)]
#[cfg_attr(not(debug_assertions), expect(dead_code))]
pub fn assert_accurate(actual: &Self, estimated: &Self) {
assert_eq!(actual.nodes, estimated.nodes, "nodes count mismatch");
assert_eq!(actual.scopes, estimated.scopes, "scopes count mismatch");