See erratic book: lang_items :
The first of these rust_eh_personality functions rust_eh_personality used by compiler failure mechanisms. This is often mapped to a GCC function (see the libstd implementation for more information), but mailboxes that don't panic can be sure that this function is never called. The name of the language element is eh_personality .
As far as I can tell, it is required to create information for unwinding; if you panic_fmt or loop on a panic_fmt language panic_fmt ( panic_fmt function), it probably won't be called.
Also see internal comments in libpanic_abort / lib.rs.
If you are looking for rust_eh_personality , you will find use in librustc_trans / context.rs: CodegenCx::eh_personality . The eh_personality search should show the locations called by this function. (It is used to generate code, not a direct call.)
The search #[lang = "eh_personality"] shows only the places where the personality is determined, not the usage.
Stefan
source share