@@ -81,7 +81,7 @@ use std::mem;
8181use std:: ops:: { Bound , Deref } ;
8282use std:: sync:: Arc ;
8383
84- use super :: { ImplPolarity , ResolverOutputs , RvalueScopes } ;
84+ use super :: { ImplPolarity , RvalueScopes } ;
8585
8686pub trait OnDiskCache < ' tcx > : rustc_data_structures:: sync:: Sync {
8787 /// Creates a new `OnDiskCache` instance from the serialized data in `data`.
@@ -1040,6 +1040,12 @@ pub struct TyCtxtFeed<'tcx, KEY: Copy> {
10401040 key : KEY ,
10411041}
10421042
1043+ impl < ' tcx > TyCtxt < ' tcx > {
1044+ pub fn feed_unit_query ( self ) -> TyCtxtFeed < ' tcx , ( ) > {
1045+ TyCtxtFeed { tcx : self , key : ( ) }
1046+ }
1047+ }
1048+
10431049impl < ' tcx , KEY : Copy > TyCtxtFeed < ' tcx , KEY > {
10441050 #[ inline( always) ]
10451051 pub fn key ( & self ) -> KEY {
@@ -1106,7 +1112,6 @@ pub struct GlobalCtxt<'tcx> {
11061112
11071113 /// Output of the resolver.
11081114 pub ( crate ) untracked_resolutions : ty:: ResolverGlobalCtxt ,
1109- untracked_resolver_for_lowering : Steal < ty:: ResolverAstLowering > ,
11101115 /// The entire crate as AST. This field serves as the input for the hir_crate query,
11111116 /// which lowers it from AST to HIR. It must not be read or used by anything else.
11121117 pub untracked_crate : Steal < Lrc < ast:: Crate > > ,
@@ -1269,7 +1274,8 @@ impl<'tcx> TyCtxt<'tcx> {
12691274 lint_store : Lrc < dyn Any + sync:: Send + sync:: Sync > ,
12701275 arena : & ' tcx WorkerLocal < Arena < ' tcx > > ,
12711276 hir_arena : & ' tcx WorkerLocal < hir:: Arena < ' tcx > > ,
1272- resolver_outputs : ResolverOutputs ,
1277+ definitions : Definitions ,
1278+ untracked_resolutions : ty:: ResolverGlobalCtxt ,
12731279 krate : Lrc < ast:: Crate > ,
12741280 dep_graph : DepGraph ,
12751281 on_disk_cache : Option < & ' tcx dyn OnDiskCache < ' tcx > > ,
@@ -1278,11 +1284,6 @@ impl<'tcx> TyCtxt<'tcx> {
12781284 crate_name : & str ,
12791285 output_filenames : OutputFilenames ,
12801286 ) -> GlobalCtxt < ' tcx > {
1281- let ResolverOutputs {
1282- definitions,
1283- global_ctxt : untracked_resolutions,
1284- ast_lowering : untracked_resolver_for_lowering,
1285- } = resolver_outputs;
12861287 let data_layout = s. target . parse_data_layout ( ) . unwrap_or_else ( |err| {
12871288 s. emit_fatal ( err) ;
12881289 } ) ;
@@ -1311,7 +1312,6 @@ impl<'tcx> TyCtxt<'tcx> {
13111312 lifetimes : common_lifetimes,
13121313 consts : common_consts,
13131314 untracked_resolutions,
1314- untracked_resolver_for_lowering : Steal :: new ( untracked_resolver_for_lowering) ,
13151315 untracked_crate : Steal :: new ( krate) ,
13161316 on_disk_cache,
13171317 queries,
@@ -3114,7 +3114,6 @@ fn ptr_eq<T, U>(t: *const T, u: *const U) -> bool {
31143114
31153115pub fn provide ( providers : & mut ty:: query:: Providers ) {
31163116 providers. resolutions = |tcx, ( ) | & tcx. untracked_resolutions ;
3117- providers. resolver_for_lowering = |tcx, ( ) | & tcx. untracked_resolver_for_lowering ;
31183117 providers. module_reexports =
31193118 |tcx, id| tcx. resolutions ( ( ) ) . reexport_map . get ( & id) . map ( |v| & v[ ..] ) ;
31203119 providers. crate_name = |tcx, id| {
0 commit comments