Use intrinsics::catch_unwind instead of intrinsics::try
intrinsics::try has been renamed in https://github.com/rust-lang/rust/pull/121598.
This commit is contained in:
parent
6720a34c66
commit
d7cd46e009
@ -39,7 +39,7 @@ pub fn catch_unwind<E: Exception, R, F: FnOnce() -> R>(f: F) -> Result<R, Option
|
||||
|
||||
let data_ptr = &mut data as *mut _ as *mut u8;
|
||||
unsafe {
|
||||
return if core::intrinsics::r#try(do_call::<F, R>, data_ptr, do_catch::<E>) == 0 {
|
||||
return if core::intrinsics::catch_unwind(do_call::<F, R>, data_ptr, do_catch::<E>) == 0 {
|
||||
Ok(ManuallyDrop::into_inner(data.r))
|
||||
} else {
|
||||
Err(ManuallyDrop::into_inner(data.p))
|
||||
|
Loading…
Reference in New Issue
Block a user