Skip to content

refactor(allocator): fix legacy_numeric_constants clippy warnings#21231

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/04-09-refactor_allocator_fix_legacy_numeric_constants_clippy_warnings
Apr 9, 2026
Merged

refactor(allocator): fix legacy_numeric_constants clippy warnings#21231
graphite-app[bot] merged 1 commit intomainfrom
om/04-09-refactor_allocator_fix_legacy_numeric_constants_clippy_warnings

Conversation

@overlookmotel
Copy link
Copy Markdown
Member

@overlookmotel overlookmotel commented Apr 9, 2026

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.

Copy link
Copy Markdown
Member Author

overlookmotel commented Apr 9, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the clippy::legacy_numeric_constants expectation by eliminating the now-unneeded core::usize import in bumpalo_alloc.rs.

Changes:

  • Dropped clippy::legacy_numeric_constants from the crate-level #![expect(...)] list.
  • Removed use core::usize; (no longer used).

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 9, 2026

Merging this PR will not alter performance

✅ 48 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing om/04-09-refactor_allocator_fix_legacy_numeric_constants_clippy_warnings (3c9088c) with main (36cdc31)2

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (3c9088c) during the generation of this report, so 36cdc31 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@graphite-app
Copy link
Copy Markdown
Contributor

graphite-app bot commented Apr 9, 2026

Merge activity

…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.
@graphite-app graphite-app bot force-pushed the om/04-09-refactor_allocator_fix_legacy_numeric_constants_clippy_warnings branch from a440ebf to 3c9088c Compare April 9, 2026 13:13
graphite-app bot pushed a commit that referenced this pull request Apr 9, 2026
graphite-app bot pushed a commit that referenced this pull request Apr 9, 2026
Continuation of #21231.

Also remove a pointless branch condition.
graphite-app bot pushed a commit that referenced this pull request Apr 9, 2026
graphite-app bot pushed a commit that referenced this pull request Apr 9, 2026
graphite-app bot pushed a commit that referenced this pull request Apr 9, 2026
graphite-app bot pushed a commit that referenced this pull request Apr 9, 2026
graphite-app bot pushed a commit that referenced this pull request Apr 9, 2026
graphite-app bot pushed a commit that referenced this pull request Apr 9, 2026
@graphite-app graphite-app bot merged commit 3c9088c into main Apr 9, 2026
35 checks passed
@graphite-app graphite-app bot deleted the om/04-09-refactor_allocator_fix_legacy_numeric_constants_clippy_warnings branch April 9, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-allocator Area - Allocator C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants