refactor(allocator): fix unsafe_op_in_unsafe_fn clippy warnings#21238
Merged
graphite-app[bot] merged 1 commit intoApr 9, 2026
Conversation
This was referenced Apr 9, 2026
Member
Author
overlookmotel
marked this pull request as ready for review
April 9, 2026 10:21
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors bumpalo_alloc.rs to address Rust/Clippy’s unsafe_op_in_unsafe_fn expectations by making unsafe operations explicit via unsafe { ... } blocks, allowing removal of the file-level unsafe_op_in_unsafe_fn expectation.
Changes:
- Removed
unsafe_op_in_unsafe_fnfrom the crate-level#![expect(...)]list. - Wrapped calls to unsafe trait methods (
alloc,realloc,dealloc,grow_in_place,shrink_in_place) in explicitunsafeblocks withinunsafe fndefault implementations. - Wrapped unsafe core operations (
Layout::from_size_align_unchecked,ptr::copy_nonoverlapping,ptr::write_bytes) in explicitunsafeblocks.
Merging this PR will not alter performance
Comparing Footnotes
|
Contributor
Merge activity
|
graphite-app
Bot
force-pushed
the
om/04-09-refactor_allocator_fix_unused_self_clippy_warnings
branch
from
April 9, 2026 13:17
b7baf81 to
64491c8
Compare
graphite-app
Bot
force-pushed
the
om/04-09-refactor_allocator_fix_unsafe_op_in_unsafe_fn_clippy_warnings
branch
from
April 9, 2026 13:18
fed13ce to
5770c68
Compare
Base automatically changed from
om/04-09-refactor_allocator_fix_unused_self_clippy_warnings
to
main
April 9, 2026 13:29
graphite-app
Bot
deleted the
om/04-09-refactor_allocator_fix_unsafe_op_in_unsafe_fn_clippy_warnings
branch
April 9, 2026 13:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Continuation of #21231.