Skip to content
This repository was archived by the owner on Nov 7, 2022. It is now read-only.

Commit a214a4f

Browse files
qwandorandre-richter
authored andcommitted
Use stable unreachable_unchecked rather than intrinsic unreachable.
1 parent c5964a2 commit a214a4f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/asm.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,12 @@ pub fn sev() {
8888
/// Exception return
8989
///
9090
/// Will jump to wherever the corresponding link register points to, and therefore never return.
91-
#[cfg(feature = "nightly")]
9291
#[inline(always)]
9392
pub fn eret() -> ! {
9493
#[cfg(target_arch = "aarch64")]
9594
unsafe {
9695
core::arch::asm!("eret", options(nomem, nostack));
97-
core::intrinsics::unreachable()
96+
core::hint::unreachable_unchecked()
9897
}
9998

10099
#[cfg(not(target_arch = "aarch64"))]
@@ -104,13 +103,12 @@ pub fn eret() -> ! {
104103
/// Function return
105104
///
106105
/// Will jump to wherever the corresponding link register points to, and therefore never return.
107-
#[cfg(feature = "nightly")]
108106
#[inline(always)]
109107
pub fn ret() -> ! {
110108
#[cfg(target_arch = "aarch64")]
111109
unsafe {
112110
core::arch::asm!("ret", options(nomem, nostack));
113-
core::intrinsics::unreachable()
111+
core::hint::unreachable_unchecked()
114112
}
115113

116114
#[cfg(not(target_arch = "aarch64"))]

0 commit comments

Comments
 (0)