]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_hir/src/weak_lang_items.rs
This should address issue 81294.
[rust.git] / compiler / rustc_hir / src / weak_lang_items.rs
index 52f28bf8f4c73e9b302d1c4169f2fcd72d0300d3..b8cd15e7f00d6b420931a09db34701cdb3322ae2 100644 (file)
@@ -4,7 +4,7 @@
 use crate::{lang_items, LangItem, LanguageItems};
 
 use rustc_ast as ast;
-use rustc_data_structures::fx::FxHashMap;
+use rustc_data_structures::stable_map::StableMap;
 use rustc_span::symbol::{sym, Symbol};
 
 use std::lazy::SyncLazy;
@@ -12,8 +12,8 @@
 macro_rules! weak_lang_items {
     ($($name:ident, $item:ident, $sym:ident;)*) => (
 
-pub static WEAK_ITEMS_REFS: SyncLazy<FxHashMap<Symbol, LangItem>> = SyncLazy::new(|| {
-    let mut map = FxHashMap::default();
+pub static WEAK_ITEMS_REFS: SyncLazy<StableMap<Symbol, LangItem>> = SyncLazy::new(|| {
+    let mut map = StableMap::default();
     $(map.insert(sym::$name, LangItem::$item);)*
     map
 });