-
Notifications
You must be signed in to change notification settings - Fork 13k
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
std: Stabilize the catch_panic feature #26492
Conversation
This function has remained in std for quite some time now without modifications, and it's a core building block for robust FFI, so this commit stabilizes the signature as-is. It is possible to relax the `Send` or `'static` bounds in the future additionally. Closes rust-lang#25662
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
Although not currently done, I'd like to update the release notes if we decide to merge this, and I'd also be fine backporting this to 1.2, but I don't feel a great sense of urgency to do so. |
Are there any known problems or drawbacks to this design?
|
#25662 points out that TLS can be used to subvert the |
If a panic occurs while a mutable borrow exists, currently only The combination of In the latter case, the From the point of view of FFI callbacks (the primary consumer of this API): the Also, |
@dgrunwald I believe the discussion in #25662 covers that question. |
After some more discussion at the work week I think we're going to want to make some more changes here, so I'm going to close this in favor of an upcoming RFC. |
This function has remained in std for quite some time now without modifications,
and it's a core building block for robust FFI, so this commit stabilizes the
signature as-is.
It is possible to relax the
Send
or'static
bounds in the futureadditionally.
Closes #25662