From 243030b1408a70f073878e5a206d46d43fc60dab Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 26 Sep 2018 07:48:43 -0700 Subject: [PATCH] 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! --- src/libstd/panicking.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libstd/panicking.rs b/src/libstd/panicking.rs index 6eb2db8e63b..f79c986cc89 100644 --- a/src/libstd/panicking.rs +++ b/src/libstd/panicking.rs @@ -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) -> ! { -- 2.44.0