@@ -27,7 +27,8 @@ use rustc_data_structures::sharded::{IntoPointer, ShardedHashMap};
27
27
use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
28
28
use rustc_data_structures:: steal:: Steal ;
29
29
use rustc_data_structures:: sync:: {
30
- self , DynSend , DynSync , FreezeReadGuard , Lock , RwLock , WorkerLocal ,
30
+ self , AppendOnlyIndexVec , DynSend , DynSync , FreezeLock , FreezeReadGuard , Lock , RwLock ,
31
+ WorkerLocal ,
31
32
} ;
32
33
use rustc_errors:: {
33
34
Applicability , Diag , DiagCtxtHandle , ErrorGuaranteed , LintDiagnostic , LintEmitter , MultiSpan ,
@@ -49,7 +50,7 @@ use rustc_session::config::CrateType;
49
50
use rustc_session:: cstore:: { CrateStoreDyn , Untracked } ;
50
51
use rustc_session:: lint:: Lint ;
51
52
use rustc_session:: { Limit , Session } ;
52
- use rustc_span:: def_id:: { CRATE_DEF_ID , DefPathHash , StableCrateId } ;
53
+ use rustc_span:: def_id:: { CRATE_DEF_ID , DefPathHash , StableCrateId , StableCrateIdMap } ;
53
54
use rustc_span:: { DUMMY_SP , Ident , Span , Symbol , kw, sym} ;
54
55
use rustc_type_ir:: TyKind :: * ;
55
56
use rustc_type_ir:: lang_items:: TraitSolverLangItem ;
@@ -1688,7 +1689,7 @@ impl<'tcx> TyCtxt<'tcx> {
1688
1689
stable_crate_id : StableCrateId ,
1689
1690
arena : & ' tcx WorkerLocal < Arena < ' tcx > > ,
1690
1691
hir_arena : & ' tcx WorkerLocal < hir:: Arena < ' tcx > > ,
1691
- untracked : Untracked ,
1692
+ cstore : Box < CrateStoreDyn > ,
1692
1693
dep_graph : DepGraph ,
1693
1694
query_kinds : & ' tcx [ DepKindStruct < ' tcx > ] ,
1694
1695
query_system : QuerySystem < ' tcx > ,
@@ -1697,6 +1698,17 @@ impl<'tcx> TyCtxt<'tcx> {
1697
1698
jobserver_proxy : Arc < Proxy > ,
1698
1699
f : impl FnOnce ( TyCtxt < ' tcx > ) -> T ,
1699
1700
) -> T {
1701
+ let cstore = FreezeLock :: new ( cstore) ;
1702
+ let definitions = FreezeLock :: new ( Definitions :: new ( stable_crate_id) ) ;
1703
+
1704
+ let stable_crate_ids = FreezeLock :: new ( StableCrateIdMap :: default ( ) ) ;
1705
+ let untracked = Untracked {
1706
+ cstore,
1707
+ source_span : AppendOnlyIndexVec :: new ( ) ,
1708
+ definitions,
1709
+ stable_crate_ids,
1710
+ } ;
1711
+
1700
1712
let data_layout = s. target . parse_data_layout ( ) . unwrap_or_else ( |err| {
1701
1713
s. dcx ( ) . emit_fatal ( err) ;
1702
1714
} ) ;
0 commit comments