From a702bc88ffc59dcd152ad080868e888bbe6c0dbd Mon Sep 17 00:00:00 2001 From: Stanislav Ravas Date: Sat, 27 Apr 2024 09:42:47 +0200 Subject: [PATCH] fix: change core::intrinsics::r#try -> catch_unwind Follow change in rust core library in commit b4ca582b898. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index bc93c19..03b4783 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -252,7 +252,7 @@ unsafe fn catch_unwind R>(f: F) -> Result{ let data_ptr = &mut data as *mut _ as *mut u8; - if core::intrinsics::r#try(do_call::, data_ptr, do_catch::) == 0{ + if core::intrinsics::catch_unwind(do_call::, data_ptr, do_catch::) == 0{ Result::Ok(ManuallyDrop::into_inner(data.r)) }else{ Result::Err(())