@@ -14,10 +14,11 @@ use rustc_middle::arena::ArenaAllocatable;
1414use rustc_middle:: metadata:: ModChild ;
1515use rustc_middle:: middle:: exported_symbols:: ExportedSymbol ;
1616use rustc_middle:: middle:: stability:: DeprecationEntry ;
17+ use rustc_middle:: query:: ExternProviders ;
1718use rustc_middle:: query:: LocalCrate ;
18- use rustc_middle:: query:: { ExternProviders , Providers } ;
1919use rustc_middle:: ty:: fast_reject:: SimplifiedType ;
2020use rustc_middle:: ty:: { self , TyCtxt } ;
21+ use rustc_middle:: util:: Providers ;
2122use rustc_session:: cstore:: CrateStore ;
2223use rustc_session:: { Session , StableCrateId } ;
2324use rustc_span:: hygiene:: { ExpnHash , ExpnId } ;
@@ -147,7 +148,7 @@ macro_rules! provide_one {
147148macro_rules! provide {
148149 ( $tcx: ident, $def_id: ident, $other: ident, $cdata: ident,
149150 $( $name: ident => { $( $compute: tt) * } ) * ) => {
150- pub fn provide_extern( providers: & mut ExternProviders ) {
151+ fn provide_extern( providers: & mut ExternProviders ) {
151152 $( provide_one! {
152153 $tcx, $def_id, $other, $cdata, $name => { $( $compute) * }
153154 } ) *
@@ -385,7 +386,7 @@ pub(in crate::rmeta) fn provide(providers: &mut Providers) {
385386 // FIXME(#44234) - almost all of these queries have no sub-queries and
386387 // therefore no actual inputs, they're just reading tables calculated in
387388 // resolve! Does this work? Unsure! That's what the issue is about
388- * providers = Providers {
389+ providers. queries = rustc_middle :: query :: Providers {
389390 allocator_kind : |tcx, ( ) | CStore :: from_tcx ( tcx) . allocator_kind ( ) ,
390391 alloc_error_handler_kind : |tcx, ( ) | CStore :: from_tcx ( tcx) . alloc_error_handler_kind ( ) ,
391392 is_private_dep : |_tcx, LocalCrate | false ,
@@ -513,8 +514,9 @@ pub(in crate::rmeta) fn provide(providers: &mut Providers) {
513514 tcx. untracked ( ) . cstore . freeze ( ) ;
514515 tcx. arena . alloc_from_iter ( CStore :: from_tcx ( tcx) . iter_crate_data ( ) . map ( |( cnum, _) | cnum) )
515516 } ,
516- ..* providers
517+ ..providers. queries
517518 } ;
519+ provide_extern ( & mut providers. extern_queries ) ;
518520}
519521
520522impl CStore {
0 commit comments