]> git.lizzy.rs Git - rust.git/commitdiff
std: Don't let `rust_panic` get inlined
authorAlex Crichton <alex@alexcrichton.com>
Wed, 26 Sep 2018 14:48:43 +0000 (07:48 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 26 Sep 2018 14:48:43 +0000 (07:48 -0700)
It's meant for breakpoints, so if it gets inlined we can't set a
breakpoint on it easily!

src/libstd/panicking.rs

index 6eb2db8e63bfed7567ad11a842c4d13fde6292fa..f79c986cc89e454603eb3aa283a45d97c09461f4 100644 (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) -> ! {