Closed
Description
It's possible to apply the panic_handler
attribute to an extern crate
statement without errror:
#[panic_handler]
extern crate some_example_crate;
It only causes a linker error:
rust-lld: error: undefined symbol: rust_begin_unwind
(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.)
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
Centril commentedon Oct 7, 2018
cc @japaric
japaric commentedon Oct 9, 2018
I'm very busy this week and probably won't have time to look at this until next Wednesday but if someone wants to take a stab at this I would look for the logic used by
#[global_allocator]
: that attribute gives you"error: allocators must be statics"
when applied to non-static items.pnkfelix commentedon Oct 11, 2018
Visited for triage. Does not seem super critical to resolve immediately. Putting on the Release milestone (rather than RC2) to reflect this, and also downgrading priority to P-medium.
Auto merge of #54997 - davidtwco:issue-54896, r=nagisa