error[E0277]: the trait bound `unsafe extern "thiscall" fn(*mut (), i32): Function` is not satisfied
--> src\hook.rs:9:37
|
9 | #[hook(unsafe extern "thiscall" NetClient_DoEvents, offset = 0x3878)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Function` is not implemented for `unsafe extern "thiscall" fn(*mut (), i32)`
|
= help: the following other types implement trait `Function`:
unsafe fn() -> Ret
unsafe extern "C" fn() -> Ret
unsafe extern "cdecl" fn() -> Ret
unsafe extern "stdcall" fn() -> Ret
unsafe extern "fastcall" fn() -> Ret
unsafe extern "win64" fn() -> Ret
unsafe extern "system" fn() -> Ret
fn() -> Ret
and 202 others
note: required by a bound in `StaticDetour`
--> C:\Users\geo\.cargo\registry\src\index.crates.io-6f17d22bba15001f\retour-0.3.1\src\detours\statik.rs:65:28
|
65 | pub struct StaticDetour<T: Function> {
| ^^^^^^^^ required by this bound in `StaticDetour`
As the title says, the
thiscall
ABI has been stable on nightly (versionrustc 1.73.0-nightly (0bdb00d55 2023-08-15)
) since last week (in this commit).Using the
thiscall
abi on retour 0.3.1 fails.Example code:
Using
retour-utils
crate (v0.2.1)Error message