@@ -37,6 +37,7 @@ use crate::ty::{InferConst, ParamConst};
37
37
use crate :: ty:: GenericParamDefKind ;
38
38
use crate :: ty:: layout:: { LayoutDetails , TargetDataLayout , VariantIdx } ;
39
39
use crate :: ty:: query;
40
+ use crate :: ty:: query:: OnDiskCache ;
40
41
use crate :: ty:: steal:: Steal ;
41
42
use crate :: ty:: subst:: { UserSubsts , UnpackedKind } ;
42
43
use crate :: ty:: { BoundVar , BindingMode } ;
@@ -1033,6 +1034,8 @@ pub struct GlobalCtxt<'tcx> {
1033
1034
1034
1035
metadata_dep_nodes : Once < ( ) > ,
1035
1036
1037
+ pub on_disk_cache_store : Once < OnDiskCache < ' tcx > > ,
1038
+
1036
1039
pub queries : query:: Queries < ' tcx > ,
1037
1040
1038
1041
// Internal cache for metadata decoding. No need to track deps on this.
@@ -1114,7 +1117,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
1114
1117
#[ inline( always) ]
1115
1118
pub fn hir ( self ) -> & ' gcx hir_map:: Map < ' gcx > {
1116
1119
self . hir_map . get_or_init ( || {
1117
- // We can use `with_ignore ` here because the hir map does its own tracking
1120
+ // We can use `ignore_deps ` here because the hir map does its own tracking
1118
1121
DepGraph :: ignore_deps ( || self . hir_map ( LOCAL_CRATE ) )
1119
1122
} )
1120
1123
}
@@ -1220,7 +1223,6 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
1220
1223
local_providers : ty:: query:: Providers < ' tcx > ,
1221
1224
extern_providers : ty:: query:: Providers < ' tcx > ,
1222
1225
arenas : & ' tcx AllArenas < ' tcx > ,
1223
- on_disk_query_result_cache : query:: OnDiskCache < ' tcx > ,
1224
1226
crate_name : Option < String > ,
1225
1227
tx : mpsc:: Sender < Box < dyn Any + Send > > ,
1226
1228
io : InputsAndOutputs ,
@@ -1247,10 +1249,10 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
1247
1249
lowered_hir : AtomicOnce :: new ( ) ,
1248
1250
hir_map : AtomicOnce :: new ( ) ,
1249
1251
metadata_dep_nodes : Once :: new ( ) ,
1252
+ on_disk_cache_store : Once :: new ( ) ,
1250
1253
queries : query:: Queries :: new (
1251
1254
providers,
1252
1255
extern_providers,
1253
- on_disk_query_result_cache,
1254
1256
) ,
1255
1257
rcache : Default :: default ( ) ,
1256
1258
selection_cache : Default :: default ( ) ,
@@ -1437,7 +1439,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
1437
1439
-> Result < ( ) , E :: Error >
1438
1440
where E : ty:: codec:: TyEncoder
1439
1441
{
1440
- self . queries . on_disk_cache . serialize ( self . global_tcx ( ) , encoder)
1442
+ self . on_disk_cache ( ) . serialize ( self . global_tcx ( ) , encoder)
1441
1443
}
1442
1444
1443
1445
/// This checks whether one is allowed to have pattern bindings
0 commit comments