@@ -27,7 +27,7 @@ use middle::trans::type_::Type;
27
27
28
28
use util:: sha2:: Sha256 ;
29
29
30
- use std:: cell:: RefCell ;
30
+ use std:: cell:: { Cell , RefCell } ;
31
31
use std:: c_str:: ToCStr ;
32
32
use std:: hashmap:: { HashMap , HashSet } ;
33
33
use std:: local_data;
@@ -55,7 +55,7 @@ pub struct CrateContext {
55
55
tydescs : RefCell < HashMap < ty:: t , @mut tydesc_info > > ,
56
56
// Set when running emit_tydescs to enforce that no more tydescs are
57
57
// created.
58
- finished_tydescs : bool ,
58
+ finished_tydescs : Cell < bool > ,
59
59
// Track mapping of external ids to local items imported for inlining
60
60
external : RefCell < HashMap < ast:: DefId , Option < ast:: NodeId > > > ,
61
61
// Backwards version of the `external` map (inlined items to where they
@@ -189,7 +189,7 @@ impl CrateContext {
189
189
item_symbols : RefCell :: new ( HashMap :: new ( ) ) ,
190
190
link_meta : link_meta,
191
191
tydescs : RefCell :: new ( HashMap :: new ( ) ) ,
192
- finished_tydescs : false ,
192
+ finished_tydescs : Cell :: new ( false ) ,
193
193
external : RefCell :: new ( HashMap :: new ( ) ) ,
194
194
external_srcs : RefCell :: new ( HashMap :: new ( ) ) ,
195
195
non_inlineable_statics : RefCell :: new ( HashSet :: new ( ) ) ,
0 commit comments