Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions crates/oxc_allocator/src/vec2/raw_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ use core::cmp;
use core::mem;
use core::ptr::{self, NonNull};

use allocator_api2::alloc::AllocError;
use bumpalo::collections::CollectionAllocErr::{self, AllocErr, CapacityOverflow};

use crate::alloc::Alloc;
Expand Down Expand Up @@ -791,13 +790,6 @@ fn capacity_overflow() -> ! {
panic!("capacity overflow")
}

// Copied from https://github.com/fitzgen/bumpalo/blob/1d2fbea9e3d0c2be56367b9ad5382ff33852a188/src/lib.rs#L482-L486
/// Wrapper around `Layout::from_size_align` that adds debug assertions.
#[inline]
fn layout_from_size_align(size: usize, align: usize) -> Result<Layout, AllocError> {
Layout::from_size_align(size, align).map_err(|_| AllocError)
}

/// Handle collection allocation errors
///
// Causing a collection alloc error is rare case, so marked as `#[cold]` and `#[inline(never)]`
Expand Down
Loading