We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a48a77 commit 8de5bd0Copy full SHA for 8de5bd0
library/core/src/panicking.rs
@@ -208,8 +208,8 @@ fn panic_bounds_check(index: usize, len: usize) -> ! {
208
panic!("index out of bounds: the len is {len} but the index is {index}")
209
}
210
211
-#[cold]
212
-#[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)]
213
#[track_caller]
214
#[lang = "panic_misaligned_pointer_dereference"] // needed by codegen for panic on misaligned pointer deref
215
#[rustc_nounwind] // `CheckAlignment` MIR pass requires this function to never unwind
0 commit comments