@@ -79,6 +79,7 @@ pub struct SharedCrateContext<'a, 'tcx: 'a> {
79
79
mir_map : & ' a MirMap < ' tcx > ,
80
80
mir_cache : RefCell < DefIdMap < Rc < mir:: Mir < ' tcx > > > > ,
81
81
82
+ available_monomorphizations : RefCell < FnvHashSet < String > > ,
82
83
available_drop_glues : RefCell < FnvHashMap < DropGlueKind < ' tcx > , String > > ,
83
84
use_dll_storage_attrs : bool ,
84
85
@@ -104,7 +105,6 @@ pub struct LocalCrateContext<'tcx> {
104
105
/// Cache instances of monomorphic and polymorphic items
105
106
instances : RefCell < FnvHashMap < Instance < ' tcx > , ValueRef > > ,
106
107
monomorphizing : RefCell < DefIdMap < usize > > ,
107
- available_monomorphizations : RefCell < FnvHashSet < String > > ,
108
108
/// Cache generated vtables
109
109
vtables : RefCell < FnvHashMap < ty:: PolyTraitRef < ' tcx > , ValueRef > > ,
110
110
/// Cache of constant strings,
@@ -356,6 +356,7 @@ impl<'b, 'tcx> SharedCrateContext<'b, 'tcx> {
356
356
} ,
357
357
check_overflow : check_overflow,
358
358
check_drop_flag_for_sanity : check_drop_flag_for_sanity,
359
+ available_monomorphizations : RefCell :: new ( FnvHashSet ( ) ) ,
359
360
available_drop_glues : RefCell :: new ( FnvHashMap ( ) ) ,
360
361
use_dll_storage_attrs : use_dll_storage_attrs,
361
362
translation_items : RefCell :: new ( FnvHashMap ( ) ) ,
@@ -473,7 +474,6 @@ impl<'tcx> LocalCrateContext<'tcx> {
473
474
external_srcs : RefCell :: new ( NodeMap ( ) ) ,
474
475
instances : RefCell :: new ( FnvHashMap ( ) ) ,
475
476
monomorphizing : RefCell :: new ( DefIdMap ( ) ) ,
476
- available_monomorphizations : RefCell :: new ( FnvHashSet ( ) ) ,
477
477
vtables : RefCell :: new ( FnvHashMap ( ) ) ,
478
478
const_cstr_cache : RefCell :: new ( FnvHashMap ( ) ) ,
479
479
const_unsized : RefCell :: new ( FnvHashMap ( ) ) ,
@@ -723,7 +723,7 @@ impl<'b, 'tcx> CrateContext<'b, 'tcx> {
723
723
}
724
724
725
725
pub fn available_monomorphizations < ' a > ( & ' a self ) -> & ' a RefCell < FnvHashSet < String > > {
726
- & self . local . available_monomorphizations
726
+ & self . shared . available_monomorphizations
727
727
}
728
728
729
729
pub fn available_drop_glues ( & self ) -> & RefCell < FnvHashMap < DropGlueKind < ' tcx > , String > > {
0 commit comments