From 2dfb7c710b0de56925326a90fde12b1db97304a7 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Thu, 9 Apr 2026 10:04:58 +0000 Subject: [PATCH] refactor(allocator): fix `unnecessary_safety_comment` clippy warnings (#21229) Continuation of [#21210](https://github.com/oxc-project/oxc/pull/21210). --- crates/oxc_allocator/src/bump.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/oxc_allocator/src/bump.rs b/crates/oxc_allocator/src/bump.rs index 2337f046aa74f..8f610b628a3c9 100644 --- a/crates/oxc_allocator/src/bump.rs +++ b/crates/oxc_allocator/src/bump.rs @@ -7,8 +7,7 @@ clippy::inline_always, clippy::missing_errors_doc, clippy::missing_panics_doc, - clippy::undocumented_unsafe_blocks, - clippy::unnecessary_safety_comment + clippy::undocumented_unsafe_blocks )] #![deny(missing_debug_implementations)] #![deny(missing_docs)] @@ -1156,8 +1155,7 @@ impl Bump { unsafe { ptr::write(ptr, f()) }; } - //SAFETY: Self-contained: - // `p` is allocated for `T` and then a `T` is written. + // Self-contained: `p` is allocated for `T` and then a `T` is written. let layout = Layout::new::(); let p = self.try_alloc_layout(layout)?; let p = p.as_ptr().cast::();