When detouring functions with long signatures, it's convenient to layout function parameters on their own lines. When doing this, adding a trailing comma matches the format rustfmt uses for long function signatures. This currently causes a recursion error.
Allowing a trailing comma would add flexibility, and remove an error message which is unclear.
error: recursion limit reached while expanding $crate::static_detour!
--> src/lib.rs:3:1
3
/ retour::static_detour! {
4
pub static Foo: unsafe extern "C" fn(
5
Option<NonNull>,
6
Option<NonNull>,
...
9
);
10
}
_^
= help: consider increasing the recursion limit by adding a #![recursion_limit = "256"] attribute to your crate (testing)
= note: this error originates in the macro $crate::static_detour which comes from the expansion of the macro retour::static_detour (in Nightly builds, run with -Z macro-backtrace for more info)
When detouring functions with long signatures, it's convenient to layout function parameters on their own lines. When doing this, adding a trailing comma matches the format rustfmt uses for long function signatures. This currently causes a recursion error.
Allowing a trailing comma would add flexibility, and remove an error message which is unclear.
Example