@@ -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 ,
@@ -48,7 +49,7 @@ use rustc_session::config::CrateType;
48
49
use rustc_session:: cstore:: { CrateStoreDyn , Untracked } ;
49
50
use rustc_session:: lint:: Lint ;
50
51
use rustc_session:: { Limit , MetadataKind , Session } ;
51
- use rustc_span:: def_id:: { CRATE_DEF_ID , DefPathHash , StableCrateId } ;
52
+ use rustc_span:: def_id:: { CRATE_DEF_ID , DefPathHash , StableCrateId , StableCrateIdMap } ;
52
53
use rustc_span:: { DUMMY_SP , Ident , Span , Symbol , kw, sym} ;
53
54
use rustc_type_ir:: TyKind :: * ;
54
55
use rustc_type_ir:: lang_items:: TraitSolverLangItem ;
@@ -1684,7 +1685,7 @@ impl<'tcx> TyCtxt<'tcx> {
1684
1685
stable_crate_id : StableCrateId ,
1685
1686
arena : & ' tcx WorkerLocal < Arena < ' tcx > > ,
1686
1687
hir_arena : & ' tcx WorkerLocal < hir:: Arena < ' tcx > > ,
1687
- untracked : Untracked ,
1688
+ cstore : Box < CrateStoreDyn > ,
1688
1689
dep_graph : DepGraph ,
1689
1690
query_kinds : & ' tcx [ DepKindStruct < ' tcx > ] ,
1690
1691
query_system : QuerySystem < ' tcx > ,
@@ -1693,6 +1694,17 @@ impl<'tcx> TyCtxt<'tcx> {
1693
1694
jobserver_proxy : Arc < Proxy > ,
1694
1695
f : impl FnOnce ( TyCtxt < ' tcx > ) -> T ,
1695
1696
) -> T {
1697
+ let cstore = FreezeLock :: new ( cstore) ;
1698
+ let definitions = FreezeLock :: new ( Definitions :: new ( stable_crate_id) ) ;
1699
+
1700
+ let stable_crate_ids = FreezeLock :: new ( StableCrateIdMap :: default ( ) ) ;
1701
+ let untracked = Untracked {
1702
+ cstore,
1703
+ source_span : AppendOnlyIndexVec :: new ( ) ,
1704
+ definitions,
1705
+ stable_crate_ids,
1706
+ } ;
1707
+
1696
1708
let data_layout = s. target . parse_data_layout ( ) . unwrap_or_else ( |err| {
1697
1709
s. dcx ( ) . emit_fatal ( err) ;
1698
1710
} ) ;
0 commit comments