Skip to content

Commit 8de5bd0

Browse files
committed
use the usual attributes for panic_misaligned_pointer_dereference
1 parent 2a48a77 commit 8de5bd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: library/core/src/panicking.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ fn panic_bounds_check(index: usize, len: usize) -> ! {
208208
panic!("index out of bounds: the len is {len} but the index is {index}")
209209
}
210210

211-
#[cold]
212-
#[cfg_attr(not(feature = "panic_immediate_abort"), inline(never))]
211+
#[cfg_attr(not(feature = "panic_immediate_abort"), inline(never), cold)]
212+
#[cfg_attr(feature = "panic_immediate_abort", inline)]
213213
#[track_caller]
214214
#[lang = "panic_misaligned_pointer_dereference"] // needed by codegen for panic on misaligned pointer deref
215215
#[rustc_nounwind] // `CheckAlignment` MIR pass requires this function to never unwind

0 commit comments

Comments
 (0)