@@ -280,7 +280,7 @@ fn configure_and_expand(
280
280
281
281
fn early_lint_checks ( tcx : TyCtxt < ' _ > , ( ) : ( ) ) {
282
282
let sess = tcx. sess ;
283
- let ( resolver, krate) = & * tcx. resolver_for_lowering ( ( ) ) . borrow ( ) ;
283
+ let ( resolver, krate) = & * tcx. resolver_for_lowering ( ( ) ) . 0 . borrow ( ) ;
284
284
let mut lint_buffer = resolver. lint_buffer . steal ( ) ;
285
285
286
286
if sess. opts . unstable_opts . input_stats {
@@ -534,7 +534,7 @@ fn write_out_deps(tcx: TyCtxt<'_>, outputs: &OutputFilenames, out_filenames: &[P
534
534
fn resolver_for_lowering < ' tcx > (
535
535
tcx : TyCtxt < ' tcx > ,
536
536
( ) : ( ) ,
537
- ) -> & ' tcx Steal < ( ty:: ResolverAstLowering , Lrc < ast:: Crate > ) > {
537
+ ) -> ( & ' tcx Steal < ( ty:: ResolverAstLowering , Lrc < ast:: Crate > ) > , & ' tcx ty :: ResolverGlobalCtxt ) {
538
538
let arenas = Resolver :: arenas ( ) ;
539
539
let _ = tcx. registered_tools ( ( ) ) ; // Uses `crate_for_resolver`.
540
540
let ( krate, pre_configured_attrs) = tcx. crate_for_resolver ( ( ) ) . steal ( ) ;
@@ -549,9 +549,8 @@ fn resolver_for_lowering<'tcx>(
549
549
ast_lowering : untracked_resolver_for_lowering,
550
550
} = resolver. into_outputs ( ) ;
551
551
552
- let feed = tcx. feed_unit_query ( ) ;
553
- feed. resolutions ( tcx. arena . alloc ( untracked_resolutions) ) ;
554
- tcx. arena . alloc ( Steal :: new ( ( untracked_resolver_for_lowering, Lrc :: new ( krate) ) ) )
552
+ let resolutions = tcx. arena . alloc ( untracked_resolutions) ;
553
+ ( tcx. arena . alloc ( Steal :: new ( ( untracked_resolver_for_lowering, Lrc :: new ( krate) ) ) ) , resolutions)
555
554
}
556
555
557
556
pub ( crate ) fn write_dep_info ( tcx : TyCtxt < ' _ > ) {
@@ -610,6 +609,7 @@ pub static DEFAULT_QUERY_PROVIDERS: LazyLock<Providers> = LazyLock::new(|| {
610
609
providers. resolver_for_lowering = resolver_for_lowering;
611
610
providers. stripped_cfg_items =
612
611
|tcx, _| tcx. arena . alloc_from_iter ( tcx. resolutions ( ( ) ) . stripped_cfg_items . steal ( ) ) ;
612
+ providers. resolutions = |tcx, ( ) | tcx. resolver_for_lowering ( ( ) ) . 1 ;
613
613
providers. early_lint_checks = early_lint_checks;
614
614
proc_macro_decls:: provide ( providers) ;
615
615
rustc_const_eval:: provide ( providers) ;
0 commit comments