File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ mod tests {
14
14
use crate :: error:: { Error , Result } ;
15
15
use crate :: RawDetour ;
16
16
use matches:: assert_matches;
17
+ use std:: arch:: asm;
17
18
use std:: mem;
18
19
19
20
/// Default test case function definition.
@@ -43,12 +44,12 @@ mod tests {
43
44
asm ! (
44
45
"
45
46
xor eax, eax
46
- je ret5
47
+ je 5f
47
48
mov eax, 2
48
- jmp done
49
- ret5 :
49
+ jmp 1f
50
+ 5 :
50
51
mov eax, 5
51
- done :
52
+ 1 :
52
53
ret" ,
53
54
options( noreturn)
54
55
) ;
@@ -102,11 +103,11 @@ mod tests {
102
103
unsafe extern "C" fn external_loop ( ) -> i32 {
103
104
asm ! (
104
105
"
105
- loop dest
106
+ loop 1f
106
107
nop
107
108
nop
108
109
nop
109
- dest :" ,
110
+ 1 :" ,
110
111
options( noreturn)
111
112
) ;
112
113
}
Original file line number Diff line number Diff line change 2
2
#![ cfg_attr( feature = "nightly" , feature( unboxed_closures, abi_thiscall) ) ]
3
3
#![ cfg_attr(
4
4
all( feature = "nightly" , test) ,
5
- feature( naked_functions, core_intrinsics, asm )
5
+ feature( naked_functions, core_intrinsics)
6
6
) ]
7
7
8
8
//! A cross-platform detour library written in Rust.
You can’t perform that action at this time.
0 commit comments