@@ -46,7 +46,7 @@ use ty::{TyVar, TyVid, IntVar, IntVid, FloatVar, FloatVid};
46
46
use ty:: TypeVariants :: * ;
47
47
use ty:: GenericParamDefKind ;
48
48
use ty:: layout:: { LayoutDetails , TargetDataLayout } ;
49
- use ty:: maps ;
49
+ use ty:: query ;
50
50
use ty:: steal:: Steal ;
51
51
use ty:: BindingMode ;
52
52
use ty:: CanonicalTy ;
@@ -863,11 +863,6 @@ pub struct GlobalCtxt<'tcx> {
863
863
864
864
pub dep_graph : DepGraph ,
865
865
866
- /// This provides access to the incr. comp. on-disk cache for query results.
867
- /// Do not access this directly. It is only meant to be used by
868
- /// `DepGraph::try_mark_green()` and the query infrastructure in `ty::maps`.
869
- pub ( crate ) on_disk_query_result_cache : maps:: OnDiskCache < ' tcx > ,
870
-
871
866
/// Common types, pre-interned for your convenience.
872
867
pub types : CommonTypes < ' tcx > ,
873
868
@@ -886,7 +881,7 @@ pub struct GlobalCtxt<'tcx> {
886
881
/// as well as all upstream crates. Only populated in incremental mode.
887
882
pub def_path_hash_to_def_id : Option < FxHashMap < DefPathHash , DefId > > ,
888
883
889
- pub maps : maps :: Maps < ' tcx > ,
884
+ pub ( crate ) queries : query :: Queries < ' tcx > ,
890
885
891
886
// Records the free variables refrenced by every closure
892
887
// expression. Do not track deps for this, just recompute it from
@@ -1074,12 +1069,12 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
1074
1069
/// reference to the context, to allow formatting values that need it.
1075
1070
pub fn create_and_enter < F , R > ( s : & ' tcx Session ,
1076
1071
cstore : & ' tcx CrateStoreDyn ,
1077
- local_providers : ty:: maps :: Providers < ' tcx > ,
1078
- extern_providers : ty:: maps :: Providers < ' tcx > ,
1072
+ local_providers : ty:: query :: Providers < ' tcx > ,
1073
+ extern_providers : ty:: query :: Providers < ' tcx > ,
1079
1074
arenas : & ' tcx AllArenas < ' tcx > ,
1080
1075
resolutions : ty:: Resolutions ,
1081
1076
hir : hir_map:: Map < ' tcx > ,
1082
- on_disk_query_result_cache : maps :: OnDiskCache < ' tcx > ,
1077
+ on_disk_query_result_cache : query :: OnDiskCache < ' tcx > ,
1083
1078
crate_name : & str ,
1084
1079
tx : mpsc:: Sender < Box < dyn Any + Send > > ,
1085
1080
output_filenames : & OutputFilenames ,
@@ -1144,7 +1139,6 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
1144
1139
global_arenas : & arenas. global ,
1145
1140
global_interners : interners,
1146
1141
dep_graph : dep_graph. clone ( ) ,
1147
- on_disk_query_result_cache,
1148
1142
types : common_types,
1149
1143
trait_map,
1150
1144
export_map : resolutions. export_map . into_iter ( ) . map ( |( k, v) | {
@@ -1165,7 +1159,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
1165
1159
. collect ( ) ,
1166
1160
hir,
1167
1161
def_path_hash_to_def_id,
1168
- maps : maps :: Maps :: new ( providers) ,
1162
+ queries : query :: Queries :: new ( providers, on_disk_query_result_cache ) ,
1169
1163
rcache : Lock :: new ( FxHashMap ( ) ) ,
1170
1164
selection_cache : traits:: SelectionCache :: new ( ) ,
1171
1165
evaluation_cache : traits:: EvaluationCache :: new ( ) ,
@@ -1343,7 +1337,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
1343
1337
-> Result < ( ) , E :: Error >
1344
1338
where E : ty:: codec:: TyEncoder
1345
1339
{
1346
- self . on_disk_query_result_cache . serialize ( self . global_tcx ( ) , encoder)
1340
+ self . queries . on_disk_cache . serialize ( self . global_tcx ( ) , encoder)
1347
1341
}
1348
1342
1349
1343
/// If true, we should use a naive AST walk to determine if match
@@ -1702,7 +1696,7 @@ pub mod tls {
1702
1696
use std:: fmt;
1703
1697
use std:: mem;
1704
1698
use syntax_pos;
1705
- use ty:: maps ;
1699
+ use ty:: query ;
1706
1700
use errors:: { Diagnostic , TRACK_DIAGNOSTICS } ;
1707
1701
use rustc_data_structures:: OnDrop ;
1708
1702
use rustc_data_structures:: sync:: { self , Lrc , Lock } ;
@@ -1726,8 +1720,8 @@ pub mod tls {
1726
1720
pub tcx : TyCtxt < ' a , ' gcx , ' tcx > ,
1727
1721
1728
1722
/// The current query job, if any. This is updated by start_job in
1729
- /// ty::maps ::plumbing when executing a query
1730
- pub query : Option < Lrc < maps :: QueryJob < ' gcx > > > ,
1723
+ /// ty::query ::plumbing when executing a query
1724
+ pub query : Option < Lrc < query :: QueryJob < ' gcx > > > ,
1731
1725
1732
1726
/// Used to prevent layout from recursing too deeply.
1733
1727
pub layout_depth : usize ,
@@ -2792,7 +2786,7 @@ impl<T, R, E> InternIteratorElement<T, R> for Result<T, E> {
2792
2786
}
2793
2787
}
2794
2788
2795
- pub fn provide ( providers : & mut ty:: maps :: Providers ) {
2789
+ pub fn provide ( providers : & mut ty:: query :: Providers ) {
2796
2790
// FIXME(#44234) - almost all of these queries have no sub-queries and
2797
2791
// therefore no actual inputs, they're just reading tables calculated in
2798
2792
// resolve! Does this work? Unsure! That's what the issue is about
0 commit comments