@@ -14,10 +14,11 @@ use rustc_middle::arena::ArenaAllocatable;
14
14
use rustc_middle:: metadata:: ModChild ;
15
15
use rustc_middle:: middle:: exported_symbols:: ExportedSymbol ;
16
16
use rustc_middle:: middle:: stability:: DeprecationEntry ;
17
+ use rustc_middle:: query:: ExternProviders ;
17
18
use rustc_middle:: query:: LocalCrate ;
18
- use rustc_middle:: query:: { ExternProviders , Providers } ;
19
19
use rustc_middle:: ty:: fast_reject:: SimplifiedType ;
20
20
use rustc_middle:: ty:: { self , TyCtxt } ;
21
+ use rustc_middle:: util:: Providers ;
21
22
use rustc_session:: cstore:: CrateStore ;
22
23
use rustc_session:: { Session , StableCrateId } ;
23
24
use rustc_span:: hygiene:: { ExpnHash , ExpnId } ;
@@ -147,7 +148,7 @@ macro_rules! provide_one {
147
148
macro_rules! provide {
148
149
( $tcx: ident, $def_id: ident, $other: ident, $cdata: ident,
149
150
$( $name: ident => { $( $compute: tt) * } ) * ) => {
150
- pub fn provide_extern( providers: & mut ExternProviders ) {
151
+ fn provide_extern( providers: & mut ExternProviders ) {
151
152
$( provide_one! {
152
153
$tcx, $def_id, $other, $cdata, $name => { $( $compute) * }
153
154
} ) *
@@ -385,7 +386,7 @@ pub(in crate::rmeta) fn provide(providers: &mut Providers) {
385
386
// FIXME(#44234) - almost all of these queries have no sub-queries and
386
387
// therefore no actual inputs, they're just reading tables calculated in
387
388
// resolve! Does this work? Unsure! That's what the issue is about
388
- * providers = Providers {
389
+ providers. queries = rustc_middle :: query :: Providers {
389
390
allocator_kind : |tcx, ( ) | CStore :: from_tcx ( tcx) . allocator_kind ( ) ,
390
391
alloc_error_handler_kind : |tcx, ( ) | CStore :: from_tcx ( tcx) . alloc_error_handler_kind ( ) ,
391
392
is_private_dep : |_tcx, LocalCrate | false ,
@@ -513,8 +514,9 @@ pub(in crate::rmeta) fn provide(providers: &mut Providers) {
513
514
tcx. untracked ( ) . cstore . freeze ( ) ;
514
515
tcx. arena . alloc_from_iter ( CStore :: from_tcx ( tcx) . iter_crate_data ( ) . map ( |( cnum, _) | cnum) )
515
516
} ,
516
- ..* providers
517
+ ..providers. queries
517
518
} ;
519
+ provide_extern ( & mut providers. extern_queries ) ;
518
520
}
519
521
520
522
impl CStore {
0 commit comments