Add AllocUnwrap trait, which provides alloc_unwrap and alloc_expect and is implemented for Option and Result
Refactor alloc_panic to use a function like the stdlib. This allows us to mark that function as #[cold] and #[inline(never)], hopefully reducing the inline size of the alloc_panic macro and also improving branch prediction.
AllocUnwrap
trait, which providesalloc_unwrap
andalloc_expect
and is implemented forOption
andResult
alloc_panic
to use a function like the stdlib. This allows us to mark that function as#[cold]
and#[inline(never)]
, hopefully reducing the inline size of thealloc_panic
macro and also improving branch prediction.