mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +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:
1 parent
bb95306efd
commit
47d9ad8cbf
1 file changed
+1
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user