1 //! Validity checking for weak lang items
5 use rustc_span::symbol::{sym, Symbol};
7 macro_rules! weak_lang_items {
8 ($($item:ident, $sym:ident;)*) => {
9 pub static WEAK_LANG_ITEMS: &[LangItem] = &[$(LangItem::$item,)*];
12 pub fn is_weak(self) -> bool {
13 matches!(self, $(LangItem::$item)|*)
16 pub fn link_name(self) -> Option<Symbol> {
18 $( LangItem::$item => Some(sym::$sym),)*
27 PanicImpl, rust_begin_unwind;
28 EhPersonality, rust_eh_personality;
29 EhCatchTypeinfo, rust_eh_catch_typeinfo;