Function pointers are not VaArgSafe
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
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 https://github.com/rust-lang/rust/issues/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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked tracking issue #44930 and the FnPtr trait documentation, then review the VaArgSafe and function-pointer design discussed there. Done means identifying a design that supports fn types without unresolved coherence issues and can be considered for stabilization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100