Skip to content

Commit 0ca68bb

Browse files
committed
Rollup merge of rust-lang#54590 - alexcrichton:inline-never-rust-panic, r=dtolnay
std: Don't let `rust_panic` get inlined It's meant for breakpoints, so if it gets inlined we can't set a breakpoint on it easily! Will hopefully help fix at least one aspect of rust-lang#49013
2 parents a6d0599 + 243030b commit 0ca68bb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: src/libstd/panicking.rs

+1
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ pub fn update_count_then_panic(msg: Box<dyn Any + Send>) -> ! {
517517
}
518518

519519
/// A private no-mangle function on which to slap yer breakpoints.
520+
#[inline(never)]
520521
#[no_mangle]
521522
#[allow(private_no_mangle_fns)] // yes we get it, but we like breakpoints
522523
pub fn rust_panic(mut msg: &mut dyn BoxMeUp) -> ! {

0 commit comments

Comments
 (0)