Rollup merge of #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 https://github.com/rust-lang/rust/issues/49013
This commit is contained in:
kennytm 2018-09-29 13:21:15 +08:00
commit 0ca68bb82a
No known key found for this signature in database
GPG key ID: FEF6C8051D0E013C

View file

@ -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) -> ! {