@@ -80,6 +80,7 @@ pub struct SharedCrateContext<'a, 'tcx: 'a> {
80
80
mir_map : & ' a MirMap < ' tcx > ,
81
81
mir_cache : RefCell < DefIdMap < Rc < mir:: Mir < ' tcx > > > > ,
82
82
83
+ available_monomorphizations : RefCell < FnvHashSet < String > > ,
83
84
available_drop_glues : RefCell < FnvHashMap < DropGlueKind < ' tcx > , String > > ,
84
85
use_dll_storage_attrs : bool ,
85
86
@@ -105,7 +106,6 @@ pub struct LocalCrateContext<'tcx> {
105
106
/// Cache instances of monomorphic and polymorphic items
106
107
instances : RefCell < FnvHashMap < Instance < ' tcx > , ValueRef > > ,
107
108
monomorphizing : RefCell < DefIdMap < usize > > ,
108
- available_monomorphizations : RefCell < FnvHashSet < String > > ,
109
109
/// Cache generated vtables
110
110
vtables : RefCell < FnvHashMap < ty:: PolyTraitRef < ' tcx > , ValueRef > > ,
111
111
/// Cache of constant strings,
@@ -357,6 +357,7 @@ impl<'b, 'tcx> SharedCrateContext<'b, 'tcx> {
357
357
} ,
358
358
check_overflow : check_overflow,
359
359
check_drop_flag_for_sanity : check_drop_flag_for_sanity,
360
+ available_monomorphizations : RefCell :: new ( FnvHashSet ( ) ) ,
360
361
available_drop_glues : RefCell :: new ( FnvHashMap ( ) ) ,
361
362
use_dll_storage_attrs : use_dll_storage_attrs,
362
363
translation_items : RefCell :: new ( FnvHashMap ( ) ) ,
@@ -474,7 +475,6 @@ impl<'tcx> LocalCrateContext<'tcx> {
474
475
external_srcs : RefCell :: new ( NodeMap ( ) ) ,
475
476
instances : RefCell :: new ( FnvHashMap ( ) ) ,
476
477
monomorphizing : RefCell :: new ( DefIdMap ( ) ) ,
477
- available_monomorphizations : RefCell :: new ( FnvHashSet ( ) ) ,
478
478
vtables : RefCell :: new ( FnvHashMap ( ) ) ,
479
479
const_cstr_cache : RefCell :: new ( FnvHashMap ( ) ) ,
480
480
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