The #[panic_handler] attribute can be applied to non-functions #54896
Labels
P-medium
Medium priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone
It's possible to apply the
panic_handler
attribute to anextern crate
statement without errror:It only causes a linker error:
(When the
panic_handler
attribute is not defined there is a much better "#[panic_handler]
function required, but not found" error. There is also a nice error when the function signature is wrong. But it seems like the above case is not handled.)The text was updated successfully, but these errors were encountered: