forge
Explore
Log in

Don't you dare go Hollow

Mark cause_panic() as #[inline(never)]

Browse files at this commit

f4e04ac910ff0d643e28f9e0521b13cf50201115Ivan MolodetskikhParent: 236abd9
Despite compiling with frame pointers, inlining cause_panic() makes the
backtrace omit its frame and even the source location in main...
src/utils.rsmodified+1 -0
@@ -191,6 +191,7 @@ pub fn show_screenshot_notification(image_path: Option<PathBuf>) {
191 }191 }
192 }192 }
193 193
194+#[inline(never)]
194 pub fn cause_panic() {195 pub fn cause_panic() {
195 let a = Duration::from_secs(1);196 let a = Duration::from_secs(1);
196 let b = Duration::from_secs(2);197 let b = Duration::from_secs(2);