diff --git a/crates/oxc_allocator/src/allocator.rs b/crates/oxc_allocator/src/allocator.rs index ceb4b83bc0ef8..8c4c49fd4ebc3 100644 --- a/crates/oxc_allocator/src/allocator.rs +++ b/crates/oxc_allocator/src/allocator.rs @@ -253,7 +253,7 @@ impl Allocator { /// [`Vec::new_in`]: crate::Vec::new_in /// [`HashMap::new_in`]: crate::HashMap::new_in // - // `#[inline(always)]` because it's a small function + // `#[inline(always)]` because just delegates to `Bump` method #[expect(clippy::inline_always)] #[inline(always)] pub fn new() -> Self { @@ -268,7 +268,7 @@ impl Allocator { /// /// See [`Allocator`] docs for more information on efficient use of [`Allocator`]. // - // `#[inline(always)]` because it's a small function + // `#[inline(always)]` because just delegates to `Bump` method #[expect(clippy::inline_always)] #[inline(always)] pub fn with_capacity(capacity: usize) -> Self { @@ -506,7 +506,7 @@ impl Allocator { /// } /// ``` // - // `#[inline(always)]` because it's a small function + // `#[inline(always)]` because just delegates to `Bump` method #[expect(clippy::inline_always)] #[inline(always)] pub fn reset(&mut self) { @@ -536,7 +536,7 @@ impl Allocator { /// /// [`used_bytes`]: Allocator::used_bytes // - // `#[inline(always)]` because it's a small function + // `#[inline(always)]` because just delegates to `Bump` method #[expect(clippy::inline_always)] #[inline(always)] pub fn capacity(&self) -> usize { diff --git a/crates/oxc_allocator/src/from_raw_parts.rs b/crates/oxc_allocator/src/from_raw_parts.rs index aa82f678c56df..9df9ea0ae235c 100644 --- a/crates/oxc_allocator/src/from_raw_parts.rs +++ b/crates/oxc_allocator/src/from_raw_parts.rs @@ -14,7 +14,7 @@ use std::{ use crate::{Allocator, bump::Bump}; -/// Minimum alignment for allocator chunks. +/// Minimum alignment for allocator chunks. Same as for `Bump`. const MIN_ALIGN: usize = 16; const CHUNK_FOOTER_SIZE: usize = size_of::(); diff --git a/crates/oxc_data_structures/src/stack/non_empty.rs b/crates/oxc_data_structures/src/stack/non_empty.rs index 8366e6214cc14..42f2378cf36cd 100644 --- a/crates/oxc_data_structures/src/stack/non_empty.rs +++ b/crates/oxc_data_structures/src/stack/non_empty.rs @@ -58,7 +58,7 @@ use super::{StackCapacity, StackCommon}; /// uses 1 less register, but disadvantage that [`last`] and [`last_mut`] are 2 instructions, not 1. /// /// -/// 2. Stack could grow downwards, like a bump allocator does. This would probably make [`pop`] use +/// 2. Stack could grow downwards, like `bumpalo` does. This would probably make [`pop`] use /// 1 less register, but at the cost that: (a) the stack can never grow in place, which would incur /// more memory copies when the stack grows, and (b) [`as_slice`] would have the entries in /// reverse order.