From 7bee5431eb60db52c562fa1fb1495818cd52ec96 Mon Sep 17 00:00:00 2001 From: Andrew Walbran Date: Tue, 24 May 2022 13:38:24 +0100 Subject: [PATCH] Use stable unreachable_unchecked rather than intrinsic unreachable. --- src/asm.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/asm.rs b/src/asm.rs index 8774f98..70fa1cc 100644 --- a/src/asm.rs +++ b/src/asm.rs @@ -88,13 +88,12 @@ pub fn sev() { /// Exception return /// /// Will jump to wherever the corresponding link register points to, and therefore never return. -#[cfg(feature = "nightly")] #[inline(always)] pub fn eret() -> ! { #[cfg(target_arch = "aarch64")] unsafe { core::arch::asm!("eret", options(nomem, nostack)); - core::intrinsics::unreachable() + core::hint::unreachable_unchecked() } #[cfg(not(target_arch = "aarch64"))] @@ -104,13 +103,12 @@ pub fn eret() -> ! { /// Function return /// /// Will jump to wherever the corresponding link register points to, and therefore never return. -#[cfg(feature = "nightly")] #[inline(always)] pub fn ret() -> ! { #[cfg(target_arch = "aarch64")] unsafe { core::arch::asm!("ret", options(nomem, nostack)); - core::intrinsics::unreachable() + core::hint::unreachable_unchecked() } #[cfg(not(target_arch = "aarch64"))]