From f4e04ac910ff0d643e28f9e0521b13cf50201115 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Thu, 11 Jan 2024 18:29:45 +0400 Subject: Mark cause_panic() as #[inline(never)] Despite compiling with frame pointers, inlining cause_panic() makes the backtrace omit its frame and even the source location in main... --- src/utils.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/utils.rs b/src/utils.rs index ddd38dc6..9288df49 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -191,6 +191,7 @@ pub fn show_screenshot_notification(image_path: Option) { } } +#[inline(never)] pub fn cause_panic() { let a = Duration::from_secs(1); let b = Duration::from_secs(2); -- cgit