change stdlib circular dependencies handling
This commit is contained in:
parent
098cf88022
commit
b67271507d
5 changed files with 41 additions and 122 deletions
|
@ -18,6 +18,12 @@ pub static WEAK_ITEMS_REFS: LazyLock<FxIndexMap<Symbol, LangItem>> = LazyLock::n
|
|||
map
|
||||
});
|
||||
|
||||
pub static WEAK_ITEMS_SYMBOLS: LazyLock<FxIndexMap<LangItem, Symbol>> = LazyLock::new(|| {
|
||||
let mut map = FxIndexMap::default();
|
||||
$(map.insert(LangItem::$item, sym::$sym);)*
|
||||
map
|
||||
});
|
||||
|
||||
pub fn link_name(attrs: &[ast::Attribute]) -> Option<Symbol>
|
||||
{
|
||||
lang_items::extract(attrs).and_then(|(name, _)| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue