@@ -99,16 +99,6 @@ pub(super) fn try_mark_green<'tcx>(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> boo
9999 tcx. dep_graph . try_mark_green ( tcx, dep_node) . is_some ( )
100100}
101101
102- pub ( super ) fn encode_all_query_results < ' tcx > (
103- tcx : TyCtxt < ' tcx > ,
104- encoder : & mut CacheEncoder < ' _ , ' tcx > ,
105- query_result_index : & mut EncodedDepNodeIndex ,
106- ) {
107- for encode in super :: ENCODE_QUERY_RESULTS . iter ( ) . copied ( ) . flatten ( ) {
108- encode ( tcx, encoder, query_result_index) ;
109- }
110- }
111-
112102macro_rules! cycle_error_handling {
113103 ( [ ] ) => { {
114104 rustc_middle:: query:: CycleErrorHandling :: Error
@@ -290,7 +280,7 @@ where
290280 QueryStackFrame :: new ( info, kind, def_id, def_id_for_ty_in_cycle)
291281}
292282
293- pub ( crate ) fn encode_query_results_inner < ' a , ' tcx , C , V > (
283+ pub ( crate ) fn encode_query_results < ' a , ' tcx , C , V > (
294284 tcx : TyCtxt < ' tcx > ,
295285 query : & ' tcx QueryVTable < ' tcx , C > ,
296286 encoder : & mut CacheEncoder < ' a , ' tcx > ,
@@ -592,21 +582,6 @@ macro_rules! define_queries {
592582 & tcx. query_system. query_vtables. $name
593583 }
594584 }
595-
596- item_if_cache_on_disk! { [ $( $modifiers) * ]
597- pub ( crate ) fn encode_query_results<' tcx>(
598- tcx: TyCtxt <' tcx>,
599- encoder: & mut CacheEncoder <' _, ' tcx>,
600- query_result_index: & mut EncodedDepNodeIndex
601- ) {
602- $crate:: plumbing:: encode_query_results_inner(
603- tcx,
604- & tcx. query_system. query_vtables. $name,
605- encoder,
606- query_result_index,
607- )
608- }
609- }
610585 } ) * }
611586
612587 pub fn make_query_vtables<' tcx>( incremental: bool ) -> queries:: QueryVTables <' tcx> {
@@ -617,8 +592,6 @@ macro_rules! define_queries {
617592 }
618593 }
619594
620- // These arrays are used for iteration and can't be indexed by `DepKind`.
621-
622595 /// Returns a map of currently active query jobs, collected from all queries.
623596 ///
624597 /// If `require_complete` is `true`, this function locks all shards of the
@@ -679,21 +652,23 @@ macro_rules! define_queries {
679652 tcx. sess. prof. store_query_cache_hits( ) ;
680653 }
681654
682- const ENCODE_QUERY_RESULTS : & [
683- Option <for <' tcx> fn (
684- TyCtxt <' tcx>,
685- & mut CacheEncoder <' _, ' tcx>,
686- & mut EncodedDepNodeIndex )
687- >
688- ] = & [
655+ fn encode_all_query_results<' tcx>(
656+ tcx: TyCtxt <' tcx>,
657+ encoder: & mut CacheEncoder <' _, ' tcx>,
658+ query_result_index: & mut EncodedDepNodeIndex ,
659+ ) {
689660 $(
690- if_cache_on_disk!( [ $( $modifiers) * ] {
691- Some ( query_impl:: $name:: encode_query_results)
692- } {
693- None
694- } )
695- ) ,*
696- ] ;
661+ item_if_cache_on_disk! {
662+ [ $( $modifiers) * ]
663+ $crate:: plumbing:: encode_query_results(
664+ tcx,
665+ & tcx. query_system. query_vtables. $name,
666+ encoder,
667+ query_result_index,
668+ )
669+ }
670+ ) *
671+ }
697672
698673 pub fn query_key_hash_verify_all<' tcx>( tcx: TyCtxt <' tcx>) {
699674 if tcx. sess. opts. unstable_opts. incremental_verify_ich || cfg!( debug_assertions) {
0 commit comments