Skip to content

Commit

Permalink
std: Don't let rust_panic get inlined
Browse files Browse the repository at this point in the history
It's meant for breakpoints, so if it gets inlined we can't set a
breakpoint on it easily!
  • Loading branch information
alexcrichton committed Sep 26, 2018
1 parent c3a1a0d commit 243030b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libstd/panicking.rs
Expand Up @@ -517,6 +517,7 @@ pub fn update_count_then_panic(msg: Box<dyn Any + Send>) -> ! {
}

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

0 comments on commit 243030b

Please sign in to comment.