Provide fnptr impls for extern "system"#96513
Provide fnptr impls for extern "system"#96513CAD97 wants to merge 2 commits intorust-lang:masterfrom
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.)