@@ -58,7 +58,7 @@ use rustc_data_structures::stable_hasher::{HashStable, hash_stable_hashmap,
58
58
StableVec } ;
59
59
use arena:: { TypedArena , SyncDroplessArena } ;
60
60
use rustc_data_structures:: indexed_vec:: IndexVec ;
61
- use rustc_data_structures:: sync:: { Lrc , Lock } ;
61
+ use rustc_data_structures:: sync:: { Lrc , Lock , WorkerLocal } ;
62
62
use std:: any:: Any ;
63
63
use std:: borrow:: Borrow ;
64
64
use std:: cmp:: Ordering ;
@@ -80,14 +80,14 @@ use syntax_pos::Span;
80
80
use hir;
81
81
82
82
pub struct AllArenas < ' tcx > {
83
- pub global : GlobalArenas < ' tcx > ,
83
+ pub global : WorkerLocal < GlobalArenas < ' tcx > > ,
84
84
pub interner : SyncDroplessArena ,
85
85
}
86
86
87
87
impl < ' tcx > AllArenas < ' tcx > {
88
88
pub fn new ( ) -> Self {
89
89
AllArenas {
90
- global : GlobalArenas :: new ( ) ,
90
+ global : WorkerLocal :: new ( |_| GlobalArenas :: new ( ) ) ,
91
91
interner : SyncDroplessArena :: new ( ) ,
92
92
}
93
93
}
@@ -854,7 +854,7 @@ impl<'a, 'gcx, 'tcx> Deref for TyCtxt<'a, 'gcx, 'tcx> {
854
854
}
855
855
856
856
pub struct GlobalCtxt < ' tcx > {
857
- global_arenas : & ' tcx GlobalArenas < ' tcx > ,
857
+ global_arenas : & ' tcx WorkerLocal < GlobalArenas < ' tcx > > ,
858
858
global_interners : CtxtInterners < ' tcx > ,
859
859
860
860
cstore : & ' tcx CrateStoreDyn ,
0 commit comments