inline Option panics on panic_immediate_abort
This commit is contained in:
parent
3cf9ae6ff3
commit
0adee2c01e
1 changed files with 2 additions and 1 deletions
|
@ -1656,7 +1656,8 @@ impl<T, E> Option<Result<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) -> ! {
|
||||
|
|
Loading…
Add table
Reference in a new issue