@@ -81,7 +81,7 @@ use std::mem;
81
81
use std:: ops:: { Bound , Deref } ;
82
82
use std:: sync:: Arc ;
83
83
84
- use super :: { ImplPolarity , ResolverOutputs , RvalueScopes } ;
84
+ use super :: { ImplPolarity , RvalueScopes } ;
85
85
86
86
pub trait OnDiskCache < ' tcx > : rustc_data_structures:: sync:: Sync {
87
87
/// Creates a new `OnDiskCache` instance from the serialized data in `data`.
@@ -1040,6 +1040,12 @@ pub struct TyCtxtFeed<'tcx, KEY: Copy> {
1040
1040
key : KEY ,
1041
1041
}
1042
1042
1043
+ impl < ' tcx > TyCtxt < ' tcx > {
1044
+ pub fn feed_unit_query ( self ) -> TyCtxtFeed < ' tcx , ( ) > {
1045
+ TyCtxtFeed { tcx : self , key : ( ) }
1046
+ }
1047
+ }
1048
+
1043
1049
impl < ' tcx , KEY : Copy > TyCtxtFeed < ' tcx , KEY > {
1044
1050
#[ inline( always) ]
1045
1051
pub fn key ( & self ) -> KEY {
@@ -1106,7 +1112,6 @@ pub struct GlobalCtxt<'tcx> {
1106
1112
1107
1113
/// Output of the resolver.
1108
1114
pub ( crate ) untracked_resolutions : ty:: ResolverGlobalCtxt ,
1109
- untracked_resolver_for_lowering : Steal < ty:: ResolverAstLowering > ,
1110
1115
/// The entire crate as AST. This field serves as the input for the hir_crate query,
1111
1116
/// which lowers it from AST to HIR. It must not be read or used by anything else.
1112
1117
pub untracked_crate : Steal < Lrc < ast:: Crate > > ,
@@ -1269,7 +1274,8 @@ impl<'tcx> TyCtxt<'tcx> {
1269
1274
lint_store : Lrc < dyn Any + sync:: Send + sync:: Sync > ,
1270
1275
arena : & ' tcx WorkerLocal < Arena < ' tcx > > ,
1271
1276
hir_arena : & ' tcx WorkerLocal < hir:: Arena < ' tcx > > ,
1272
- resolver_outputs : ResolverOutputs ,
1277
+ definitions : Definitions ,
1278
+ untracked_resolutions : ty:: ResolverGlobalCtxt ,
1273
1279
krate : Lrc < ast:: Crate > ,
1274
1280
dep_graph : DepGraph ,
1275
1281
on_disk_cache : Option < & ' tcx dyn OnDiskCache < ' tcx > > ,
@@ -1278,11 +1284,6 @@ impl<'tcx> TyCtxt<'tcx> {
1278
1284
crate_name : & str ,
1279
1285
output_filenames : OutputFilenames ,
1280
1286
) -> GlobalCtxt < ' tcx > {
1281
- let ResolverOutputs {
1282
- definitions,
1283
- global_ctxt : untracked_resolutions,
1284
- ast_lowering : untracked_resolver_for_lowering,
1285
- } = resolver_outputs;
1286
1287
let data_layout = s. target . parse_data_layout ( ) . unwrap_or_else ( |err| {
1287
1288
s. emit_fatal ( err) ;
1288
1289
} ) ;
@@ -1311,7 +1312,6 @@ impl<'tcx> TyCtxt<'tcx> {
1311
1312
lifetimes : common_lifetimes,
1312
1313
consts : common_consts,
1313
1314
untracked_resolutions,
1314
- untracked_resolver_for_lowering : Steal :: new ( untracked_resolver_for_lowering) ,
1315
1315
untracked_crate : Steal :: new ( krate) ,
1316
1316
on_disk_cache,
1317
1317
queries,
@@ -3114,7 +3114,6 @@ fn ptr_eq<T, U>(t: *const T, u: *const U) -> bool {
3114
3114
3115
3115
pub fn provide ( providers : & mut ty:: query:: Providers ) {
3116
3116
providers. resolutions = |tcx, ( ) | & tcx. untracked_resolutions ;
3117
- providers. resolver_for_lowering = |tcx, ( ) | & tcx. untracked_resolver_for_lowering ;
3118
3117
providers. module_reexports =
3119
3118
|tcx, id| tcx. resolutions ( ( ) ) . reexport_map . get ( & id) . map ( |v| & v[ ..] ) ;
3120
3119
providers. crate_name = |tcx, id| {
0 commit comments