-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide fnptr impls for extern "system" #96513
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
(rust-highfive has picked a reviewer for you, use r? to override) |
r? rust-lang/libs-api @rustbot label +T-libs-api -T-libs |
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #97135) made this pull request unmergeable. Please resolve the merge conflicts. |
|
This overlaps with #92964. |
I wasn't aware of #92964 when I made this PR; I'll close in favor of that one (or the referenced trait solution). |
extern "system"
is a cross-platform ABI. Adding these impls means that we provide the fnptr impls for all cross-platform ABIs.A perfect solution would be to have the compiler provide these implementations, so that they're available for all ABIs and all airities, not just arities up to 12. Until we have that perfect shiny future, there's imho three defensible positions to take:
extern "Rust"
andextern "C"
— status quoThe downside of providing more impls is that the fn primitive documentation gets more crowded with more implementations. I think the benefit outweighs the downside here, especially since the trait implementations on that page are already effectively unusable.
(Side note: stable 1.60 only provides one Debug link in the sidebar, whereas beta 1.61 has one for each
impl
. This is the case for any impl which isn't parameterized.)