From 3c9088c53aadc55657c1e24eadb785d6aed59233 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Thu, 9 Apr 2026 13:13:45 +0000 Subject: [PATCH] refactor(allocator): fix `legacy_numeric_constants` clippy warnings (#21231) Same as stack starting at #21210. `bumpalo_alloc.rs` was copied directly from `bumpalo`. `bumpalo` supports much older Rust versions than Oxc does, so uses patterns which are flagged by Clippy in more recent versions. #20963 silenced these clippy errors/warnings with a large `#[expect]` block at the top of the file. This stack of PRs fixes these warnings and removes the `#[expect(clippy:...)]` comments. All PRs in this stack were generated by Claude. I had him split them into 1 PR per clippy rule so that I could review each in isolation - some of the changes, especially around pointers, are quite subtlle. --- crates/oxc_allocator/src/bumpalo_alloc.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/oxc_allocator/src/bumpalo_alloc.rs b/crates/oxc_allocator/src/bumpalo_alloc.rs index f8b7c990db7c2..b94a6965fb82b 100644 --- a/crates/oxc_allocator/src/bumpalo_alloc.rs +++ b/crates/oxc_allocator/src/bumpalo_alloc.rs @@ -11,7 +11,6 @@ #![expect( clippy::collapsible_if, clippy::equatable_if_let, - clippy::legacy_numeric_constants, clippy::missing_safety_doc, clippy::redundant_closure_for_method_calls, clippy::undocumented_unsafe_blocks, @@ -33,7 +32,6 @@ use core::cmp; use core::fmt; use core::mem; use core::ptr::{self, NonNull}; -use core::usize; pub use core::alloc::{Layout, LayoutErr};