aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-01-11 18:29:45 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2024-01-11 18:30:54 +0400
commitf4e04ac910ff0d643e28f9e0521b13cf50201115 (patch)
treec34401268414b62f48e7ad335bdf155341ed4e04
parent236abd9d9da14d614f9f36f1469ff90f441ba167 (diff)
downloadniri-f4e04ac910ff0d643e28f9e0521b13cf50201115.tar.gz
niri-f4e04ac910ff0d643e28f9e0521b13cf50201115.tar.bz2
niri-f4e04ac910ff0d643e28f9e0521b13cf50201115.zip
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...
-rw-r--r--src/utils.rs1
1 files changed, 1 insertions, 0 deletions
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<PathBuf>) {
}
}
+#[inline(never)]
pub fn cause_panic() {
let a = Duration::from_secs(1);
let b = Duration::from_secs(2);