Skip to content

Commit 26a34f1

Browse files
Re-add track_caller to panic_no_unwind in bootstrap
This function was updated in a recent PR (92911) to be called without the caller information passed in, but the function signature itself was not altered with cfg_attr at the time.
1 parent 558dec5 commit 26a34f1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/src/panicking.rs

+3
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,11 @@ fn panic_bounds_check(index: usize, len: usize) -> ! {
8484
panic!("index out of bounds: the len is {} but the index is {}", len, index)
8585
}
8686

87+
// This function is called directly by the codegen backend, and must not have
88+
// any extra arguments (including those synthesized by track_caller).
8789
#[cold]
8890
#[inline(never)]
91+
#[cfg_attr(bootstrap, track_caller)]
8992
#[lang = "panic_no_unwind"] // needed by codegen for panic in nounwind function
9093
fn panic_no_unwind() -> ! {
9194
if cfg!(feature = "panic_immediate_abort") {

0 commit comments

Comments
 (0)