Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 0001edd

Browse files
committed
Inline and remove DroplessArena::grow_and_alloc.
It has a single callsite.
1 parent a11f7e4 commit 0001edd

File tree

1 file changed

+1
-7
lines changed
  • compiler/rustc_arena/src

1 file changed

+1
-7
lines changed

compiler/rustc_arena/src/lib.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -463,12 +463,6 @@ impl DroplessArena {
463463
self.alloc_raw_without_grow(layout).unwrap()
464464
}
465465

466-
#[inline(never)]
467-
#[cold]
468-
fn grow_and_alloc<T>(&self) -> *mut u8 {
469-
self.grow_and_alloc_raw(Layout::new::<T>())
470-
}
471-
472466
/// Allocates a byte slice with specified layout from the current memory
473467
/// chunk. Returns `None` if there is no free space left to satisfy the
474468
/// request.
@@ -517,7 +511,7 @@ impl DroplessArena {
517511
} else {
518512
// No free space left. Allocate a new chunk to satisfy the request.
519513
// On failure the grow will panic or abort.
520-
self.grow_and_alloc::<T>()
514+
self.grow_and_alloc_raw(Layout::new::<T>())
521515
} as *mut T;
522516

523517
unsafe {

0 commit comments

Comments
 (0)