File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ use Span;
19
19
use symbol:: { Ident , Symbol } ;
20
20
21
21
use serialize:: { Encodable , Decodable , Encoder , Decoder } ;
22
- use std :: cell :: RefCell ;
22
+ use rustc_data_structures :: sync :: Lock ;
23
23
use std:: collections:: HashMap ;
24
24
use std:: fmt;
25
25
@@ -124,10 +124,10 @@ impl HygieneData {
124
124
}
125
125
126
126
fn with < T , F : FnOnce ( & mut HygieneData ) -> T > ( f : F ) -> T {
127
- thread_local ! {
128
- static HYGIENE_DATA : RefCell <HygieneData > = RefCell :: new( HygieneData :: new( ) ) ;
127
+ rustc_global ! {
128
+ static HYGIENE_DATA : Lock <HygieneData > = Lock :: new( HygieneData :: new( ) ) ;
129
129
}
130
- HYGIENE_DATA . with ( |data| f ( & mut * data. borrow_mut ( ) ) )
130
+ rustc_access_global ! ( HYGIENE_DATA , |data| f( & mut * data. borrow_mut( ) ) )
131
131
}
132
132
}
133
133
You can’t perform that action at this time.
0 commit comments