inline Option panics on panic_immediate_abort

This commit is contained in:
Manish Goregaokar
2021-12-10 13:08:06 +05:30
parent 3cf9ae6ff3
commit 0adee2c01e
+2 -1
View File
@@ -1656,7 +1656,8 @@ pub const fn transpose(self) -> Result<Option<T>, E> {
}
// This is a separate function to reduce the code size of .expect() itself.
#[inline(never)]
#[cfg_attr(not(feature = "panic_immediate_abort"), inline(never))]
#[cfg_attr(feature = "panic_immediate_abort", inline)]
#[cold]
#[track_caller]
const fn expect_failed(msg: &str) -> ! {