diff --git a/crates/oxc_allocator/src/from_raw_parts.rs b/crates/oxc_allocator/src/from_raw_parts.rs index b7b78d259facb..aa82f678c56df 100644 --- a/crates/oxc_allocator/src/from_raw_parts.rs +++ b/crates/oxc_allocator/src/from_raw_parts.rs @@ -259,7 +259,7 @@ fn get_current_chunk_footer_field_offset() -> usize { assert!(align_of::>>() == align_of::()); } - let bump = ManuallyDrop::new(Bump::new()); + let bump = ManuallyDrop::new(Bump::<1>::with_min_align()); bump.set_allocation_limit(Some(123)); // SAFETY: @@ -269,7 +269,7 @@ fn get_current_chunk_footer_field_offset() -> usize { // so either field order means 3rd `usize` is fully initialized // (it's either `NonNull>` or the `usize` in `Option`). unsafe { - let ptr = ptr::from_ref::>(&bump).cast::(); + let ptr = ptr::from_ref(&bump).cast::(); if *ptr.add(2) == 123 { // `allocation_limit` is 2nd field. So `current_chunk_footer` is 1st. 0