Skip to content

refactor(allocator): import bumpalo_alloc::Alloc trait as BumpaloAlloc#21256

Merged
graphite-app[bot] merged 1 commit into
mainfrom
om/04-09-refactor_allocator_import_bumpalo_alloc_alloc_trait_as_bumpaloalloc_
Apr 9, 2026
Merged

refactor(allocator): import bumpalo_alloc::Alloc trait as BumpaloAlloc#21256
graphite-app[bot] merged 1 commit into
mainfrom
om/04-09-refactor_allocator_import_bumpalo_alloc_alloc_trait_as_bumpaloalloc_

Conversation

@overlookmotel

@overlookmotel overlookmotel commented Apr 9, 2026

Copy link
Copy Markdown
Member

It's confusing that we have 2 traits called Alloc. Import the Alloc trait defined in bumpalo_alloc.rs as BumpaloAlloc to make it clearer.

overlookmotel commented Apr 9, 2026

Copy link
Copy Markdown
Member Author

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.

@github-actions github-actions Bot added A-allocator Area - Allocator C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Apr 9, 2026
@codspeed-hq

codspeed-hq Bot commented Apr 9, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 48 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing om/04-09-refactor_allocator_import_bumpalo_alloc_alloc_trait_as_bumpaloalloc_ (cf1a5a4) with om/04-09-refactor_allocator_import_from_std_at_top_level (44f82f4)

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.

@overlookmotel overlookmotel self-assigned this Apr 9, 2026
@overlookmotel
overlookmotel marked this pull request as ready for review April 9, 2026 13:50
Copilot AI review requested due to automatic review settings April 9, 2026 13:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR reduces ambiguity between two similarly named Alloc traits by aliasing the crate’s internal bumpalo_alloc::Alloc trait to BumpaloAlloc within the bump allocator implementation.

Changes:

  • Import crate::bumpalo_alloc::Alloc as BumpaloAlloc and update the corresponding unsafe impl to use the alias.
  • Adjust AllocErr re-export to use an explicit crate::bumpalo_alloc::... path after removing the module import.
  • Update internal tests/comments to reference the bumpalo_alloc module and use BumpaloAlloc for UFCS calls where applicable.

@graphite-app graphite-app Bot added the 0-merge Merge with Graphite Merge Queue label Apr 9, 2026
@graphite-app

graphite-app Bot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Merge activity

…lloc` (#21256)

It's confusing that we have 2 traits called `Alloc`. Import the `Alloc` trait defined in `bumpalo_alloc.rs` as `BumpaloAlloc` to make it clearer.
@graphite-app
graphite-app Bot force-pushed the om/04-09-refactor_allocator_import_from_std_at_top_level branch from 44f82f4 to 7f91722 Compare April 9, 2026 14:43
@graphite-app
graphite-app Bot force-pushed the om/04-09-refactor_allocator_import_bumpalo_alloc_alloc_trait_as_bumpaloalloc_ branch from cf1a5a4 to 4b86294 Compare April 9, 2026 14:44
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Apr 9, 2026
Base automatically changed from om/04-09-refactor_allocator_import_from_std_at_top_level to main April 9, 2026 14:52
@graphite-app
graphite-app Bot merged commit 4b86294 into main Apr 9, 2026
28 checks passed
@graphite-app
graphite-app Bot deleted the om/04-09-refactor_allocator_import_bumpalo_alloc_alloc_trait_as_bumpaloalloc_ branch April 9, 2026 14:55
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