diff --git a/src/arch/x86/mod.rs b/src/arch/x86/mod.rs index fdb6fb15..f5dc562d 100644 --- a/src/arch/x86/mod.rs +++ b/src/arch/x86/mod.rs @@ -14,6 +14,7 @@ mod tests { use crate::error::{Error, Result}; use crate::RawDetour; use matches::assert_matches; + use std::arch::asm; use std::mem; /// Default test case function definition. @@ -43,12 +44,12 @@ mod tests { asm!( " xor eax, eax - je ret5 + je 5f mov eax, 2 - jmp done - ret5: + jmp 1f + 5: mov eax, 5 - done: + 1: ret", options(noreturn) ); @@ -102,11 +103,11 @@ mod tests { unsafe extern "C" fn external_loop() -> i32 { asm!( " - loop dest + loop 1f nop nop nop - dest:", + 1:", options(noreturn) ); } diff --git a/src/lib.rs b/src/lib.rs index 83c8dd27..5c072e98 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,7 +2,7 @@ #![cfg_attr(feature = "nightly", feature(unboxed_closures, abi_thiscall))] #![cfg_attr( all(feature = "nightly", test), - feature(naked_functions, core_intrinsics, asm) + feature(naked_functions, core_intrinsics) )] //! A cross-platform detour library written in Rust.