mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
refactor(semantic): remove unused vars warning in release mode (#5803)
Avoid an `unused_variables` warning in release mode for a variable which is only used in debug mode.
This commit is contained in:
parent
bb95306efd
commit
47d9ad8cbf
1 changed files with 1 additions and 0 deletions
|
|
@ -267,6 +267,7 @@ impl<'a> SemanticBuilder<'a> {
|
|||
// Avoiding this growth produces up to 30% perf boost on our benchmarks.
|
||||
//
|
||||
// If user did not provide existing `Stats`, calculate them by visiting AST.
|
||||
#[cfg_attr(not(debug_assertions), expect(unused_variables))]
|
||||
let (stats, check_stats) = if let Some(stats) = self.stats {
|
||||
(stats, None)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue