File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed
compiler/rustc_middle/src/query Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -771,11 +771,24 @@ rustc_queries! {
771771 desc { |tcx| "type-checking `{}`" , tcx. def_path_str( key. to_def_id( ) ) }
772772 cache_on_disk_if { true }
773773 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) ) ;
777789
778- typeck_results. map( |x| & * tcx. arena. alloc( x) )
790+ typeck_results. map( |x| & * tcx. arena. alloc( x) )
791+ }
779792 }
780793 }
781794
You can’t perform that action at this time.
0 commit comments