From d7cd46e009ed1dbc762dbaaf4402f57973b300bb Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Thu, 29 Feb 2024 00:01:29 +0900 Subject: [PATCH] Use intrinsics::catch_unwind instead of intrinsics::try intrinsics::try has been renamed in https://github.com/rust-lang/rust/pull/121598. --- src/panicking.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panicking.rs b/src/panicking.rs index 9c83bfe..805a210 100644 --- a/src/panicking.rs +++ b/src/panicking.rs @@ -39,7 +39,7 @@ pub fn catch_unwind R>(f: F) -> Result, data_ptr, do_catch::) == 0 { + return if core::intrinsics::catch_unwind(do_call::, data_ptr, do_catch::) == 0 { Ok(ManuallyDrop::into_inner(data.r)) } else { Err(ManuallyDrop::into_inner(data.p))