diff --git a/crates/oxc_data_structures/src/stack/non_null.rs b/crates/oxc_data_structures/src/stack/non_null.rs index fdc6ca05202b9..573e0fe4c5ada 100644 --- a/crates/oxc_data_structures/src/stack/non_null.rs +++ b/crates/oxc_data_structures/src/stack/non_null.rs @@ -14,8 +14,9 @@ use std::{cmp::Ordering, ptr::NonNull as NativeNonNull}; #[derive(Debug)] pub struct NonNull(NativeNonNull); -#[expect(dead_code, clippy::incompatible_msrv)] -unsafe fn non_null_add_is_not_stable(ptr: NativeNonNull) -> NativeNonNull { +#[cfg(clippy)] +#[expect(clippy::incompatible_msrv)] +unsafe fn _non_null_add_is_not_stable(ptr: NativeNonNull) -> NativeNonNull { ptr.add(1) }