-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Description
Rust nightly-1.67.0 changes the Fn family of traits, requiring Tuple trait bounds on Fn::Args (rust-lang/rust#99943)
So now when using detour, the following error comes up:
Error
Checking detour v0.8.1
error[E0059]: type parameter to bare `Fn` trait must be a tuple
--> C:\Users\hpmas\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\detour-0.8.1\src\detours\statik.rs:106:8
|
106 | D: Fn<T::Arguments, Output = T::Output> + Send + 'static,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Tuple` is not implemented for `<T as Function>::Arguments`
|
note: required by a bound in `Fn`
--> C:\Users\hpmas\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\ops\function.rs:159:20
|
159 | pub trait Fn<Args: Tuple>: FnMut<Args> {
| ^^^^^ required by this bound in `Fn`
help: consider further restricting the associated type
|
106 | D: Fn<T::Arguments, Output = T::Output> + Send + 'static, <T as Function>::Arguments: Tuple
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error[E0059]: type parameter to bare `Fn` trait must be a tuple
--> C:\Users\hpmas\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\detour-0.8.1\src\detours\statik.rs:157:8
|
157 | C: Fn<T::Arguments, Output = T::Output> + Send + 'static,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Tuple` is not implemented for `<T as Function>::Arguments`
|
note: required by a bound in `Fn`
--> C:\Users\hpmas\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\ops\function.rs:159:20
|
159 | pub trait Fn<Args: Tuple>: FnMut<Args> {
| ^^^^^ required by this bound in `Fn`
help: consider further restricting the associated type
|
157 | C: Fn<T::Arguments, Output = T::Output> + Send + 'static, <T as Function>::Arguments: Tuple
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For more information about this error, try `rustc --explain E0059`.
error: could not compile `detour` due to 2 previous errors
I assume just the trait definition of Function needs to be updated. I know this repo hasn't had any activity in a while, but I saw some forks make commits to fix this. If there are any contributors still around that could look at PRs, I don't mind making the changes myself and creating a PR to fix this. Otherwise, maybe one of the other forks could make a PR.
Numenorean, sl1ms, TemaSM, GeneralZero, makindotcc and 7 more
Metadata
Metadata
Assignees
Labels
No labels