-
Notifications
You must be signed in to change notification settings - Fork 13.3k
#[panic_handler] does not work with std. #59222
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
Comments
cc @japaric -- I presume this is intentional, or at least a known limitation? |
Besides, I'm not sure how you could get (Also, you don't want to put |
Would crate-specific panic handlers be a possible solution to this? |
Any non-
Therefore we get to define the semantics if we want to. A reasonable way to do that would be similar to As for
I think it would be sensible to have crates for the express purpose of redefining |
I would like to see this too. Using crates like I wish it was enough to just add the crate as a dependency. |
The " |
The
#[panic_handler]
attribute does not work when using the std library. Thus, there's no way for libraries to register custom panic handlers without resorting to a lazy_static or similar global initializer.This seems like quite an oversight.
The text was updated successfully, but these errors were encountered: