Skip to content

Commit

Permalink
Rollup merge of rust-lang#54590 - alexcrichton:inline-never-rust-pani…
Browse files Browse the repository at this point in the history
…c, 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
  • Loading branch information
kennytm committed Sep 29, 2018
2 parents a6d0599 + 243030b commit 0ca68bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libstd/panicking.rs
Original file line number Diff line number Diff line change
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 0ca68bb

Please sign in to comment.