The VaArgSafe trait is not implemented for fn types -- and fixing that seems non-trivial? There is no easy way to "implement a trait for all function pointers". This is something we may have to figure out before stabilizing #44930 because surely we want to support fn types eventually and so we should be confident that the design we stabilize can accommodate that.
We do have the FnPtr trait, but wouldn't we risk coherence issues if we add something like this?
impl<T: FnPtr> VaArgSafe for T {}
Cc @folkertdev
The VaArgSafe trait is not implemented for
fntypes -- and fixing that seems non-trivial? There is no easy way to "implement a trait for all function pointers". This is something we may have to figure out before stabilizing #44930 because surely we want to support fn types eventually and so we should be confident that the design we stabilize can accommodate that.We do have the
FnPtrtrait, but wouldn't we risk coherence issues if we add something like this?Cc @folkertdev