Skip to content

Commit 6436524

Browse files
committed
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.
1 parent 3ce8546 commit 6436524

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/oxc_semantic/src/counter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl Counts {
3030
counts
3131
}
3232

33-
#[cfg(debug_assertions)]
33+
#[cfg_attr(not(debug_assertions), expect(dead_code))]
3434
pub fn assert_accurate(actual: &Self, estimated: &Self) {
3535
assert_eq!(actual.nodes, estimated.nodes, "nodes count mismatch");
3636
assert_eq!(actual.scopes, estimated.scopes, "scopes count mismatch");

0 commit comments

Comments
 (0)