use the usual attributes for panic_misaligned_pointer_dereference
This commit is contained in:
parent
2a48a7750a
commit
8de5bd0f6e
1 changed files with 2 additions and 2 deletions
|
@ -208,8 +208,8 @@ fn panic_bounds_check(index: usize, len: usize) -> ! {
|
|||
panic!("index out of bounds: the len is {len} but the index is {index}")
|
||||
}
|
||||
|
||||
#[cold]
|
||||
#[cfg_attr(not(feature = "panic_immediate_abort"), inline(never))]
|
||||
#[cfg_attr(not(feature = "panic_immediate_abort"), inline(never), cold)]
|
||||
#[cfg_attr(feature = "panic_immediate_abort", inline)]
|
||||
#[track_caller]
|
||||
#[lang = "panic_misaligned_pointer_dereference"] // needed by codegen for panic on misaligned pointer deref
|
||||
#[rustc_nounwind] // `CheckAlignment` MIR pass requires this function to never unwind
|
||||
|
|
Loading…
Add table
Reference in a new issue