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
+1
View File
@@ -517,6 +517,7 @@ fn get(&mut self) -> &(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) -> ! {