File tree 1 file changed +17
-4
lines changed
compiler/rustc_middle/src/query
1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -771,11 +771,24 @@ rustc_queries! {
771
771
desc { |tcx| "type-checking `{}`" , tcx. def_path_str( key. to_def_id( ) ) }
772
772
cache_on_disk_if { true }
773
773
load_cached( tcx, id) {
774
- let typeck_results: Option <ty:: TypeckResults <' tcx>> = tcx
775
- . on_disk_cache( ) . as_ref( )
776
- . and_then( |c| c. try_load_query_result( * tcx, id) ) ;
774
+ #[ cfg( bootstrap) ]
775
+ {
776
+ match match tcx. on_disk_cache( ) . as_ref( ) {
777
+ Some ( c) => c. try_load_query_result( * tcx, id) ,
778
+ None => None ,
779
+ } {
780
+ Some ( x) => Some ( & * tcx. arena. alloc( x) ) ,
781
+ None => None ,
782
+ }
783
+ }
784
+ #[ cfg( not( bootstrap) ) ]
785
+ {
786
+ let typeck_results: Option <ty:: TypeckResults <' tcx>> = tcx
787
+ . on_disk_cache( ) . as_ref( )
788
+ . and_then( |c| c. try_load_query_result( * tcx, id) ) ;
777
789
778
- typeck_results. map( |x| & * tcx. arena. alloc( x) )
790
+ typeck_results. map( |x| & * tcx. arena. alloc( x) )
791
+ }
779
792
}
780
793
}
781
794
You can’t perform that action at this time.
0 commit comments