Increase the reach of panic_immediate_abort

This commit is contained in:
Ben Kimock
2023-10-25 19:46:06 -04:00
parent 7cc36de72d
commit 2e7364a586
9 changed files with 87 additions and 10 deletions

View File

@@ -530,7 +530,7 @@ fn alloc_guard(alloc_size: usize) -> Result<(), TryReserveError> {
// ensure that the code generation related to these panics is minimal as there's
// only one location which panics rather than a bunch throughout the module.
#[cfg(not(no_global_oom_handling))]
#[inline(never)]
#[cfg_attr(not(feature = "panic_immediate_abort"), inline(never))]
fn capacity_overflow() -> ! {
panic!("capacity overflow");
}