From c1b2f48aeb67aa402b48e24277dca430a4801f41 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Sun, 20 Jul 2025 15:04:38 +0000 Subject: [PATCH] refactor(napi/oxlint): prevent lint warning in release mode (#12408) --- crates/oxc_allocator/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/oxc_allocator/src/lib.rs b/crates/oxc_allocator/src/lib.rs index fea2e1e4494f3..2b161fbe838d1 100644 --- a/crates/oxc_allocator/src/lib.rs +++ b/crates/oxc_allocator/src/lib.rs @@ -80,8 +80,11 @@ mod pool_fixed_size; target_endian = "little" ))] use pool_fixed_size as pool; -// Import here so `generated/assert_layouts.rs` can access it +// Import here so `generated/assert_layouts.rs` can access it. +// Add `debug_assertions` here because `assert_layouts` is only loaded in debug mode, +// so this is required to avoid unused vars lint warning in release mode. #[cfg(all( + debug_assertions, feature = "fixed_size", not(feature = "disable_fixed_size"), target_pointer_width = "64",