Skip to content

#[panic_handler] does not work with std. #59222

Open
@lachlansneff

Description

@lachlansneff

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-langRelevant to the language team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions