@@ -58,7 +58,7 @@ use rustc_data_structures::stable_hasher::{HashStable, hash_stable_hashmap,
5858 StableVec } ;
5959use arena:: { TypedArena , SyncDroplessArena } ;
6060use rustc_data_structures:: indexed_vec:: IndexVec ;
61- use rustc_data_structures:: sync:: { Lrc , Lock } ;
61+ use rustc_data_structures:: sync:: { Lrc , Lock , WorkerLocal } ;
6262use std:: any:: Any ;
6363use std:: borrow:: Borrow ;
6464use std:: cmp:: Ordering ;
@@ -80,14 +80,14 @@ use syntax_pos::Span;
8080use hir;
8181
8282pub struct AllArenas < ' tcx > {
83- pub global : GlobalArenas < ' tcx > ,
83+ pub global : WorkerLocal < GlobalArenas < ' tcx > > ,
8484 pub interner : SyncDroplessArena ,
8585}
8686
8787impl < ' tcx > AllArenas < ' tcx > {
8888 pub fn new ( ) -> Self {
8989 AllArenas {
90- global : GlobalArenas :: new ( ) ,
90+ global : WorkerLocal :: new ( |_| GlobalArenas :: new ( ) ) ,
9191 interner : SyncDroplessArena :: new ( ) ,
9292 }
9393 }
@@ -854,7 +854,7 @@ impl<'a, 'gcx, 'tcx> Deref for TyCtxt<'a, 'gcx, 'tcx> {
854854}
855855
856856pub struct GlobalCtxt < ' tcx > {
857- global_arenas : & ' tcx GlobalArenas < ' tcx > ,
857+ global_arenas : & ' tcx WorkerLocal < GlobalArenas < ' tcx > > ,
858858 global_interners : CtxtInterners < ' tcx > ,
859859
860860 cstore : & ' tcx CrateStoreDyn ,
0 commit comments