@@ -102,7 +102,7 @@ use rustc::ty::subst::SubstsRef;
102
102
use rustc:: ty:: { self , Ty , TyCtxt } ;
103
103
use rustc:: util;
104
104
use rustc:: util:: common:: ErrorReported ;
105
- use rustc_data_structures:: sync:: par_for_each;
105
+ use rustc_data_structures:: sync:: { join , par_for_each} ;
106
106
use rustc_errors:: struct_span_err;
107
107
use rustc_hir as hir;
108
108
use rustc_hir:: def_id:: { DefId , LOCAL_CRATE } ;
@@ -345,14 +345,19 @@ pub fn check_crate(tcx: TyCtxt<'_>) -> Result<(), ErrorReported> {
345
345
tcx. sess . time ( "wf_checking" , || check:: check_wf_new ( tcx) ) ;
346
346
} ) ?;
347
347
348
- tcx. sess . time ( "item_types_checking" , || {
349
- par_for_each ( & tcx. hir ( ) . krate ( ) . modules , |( & module, _) | {
350
- tcx. ensure ( ) . check_mod_item_types ( tcx. hir ( ) . local_def_id ( module) ) ;
351
- } ) ;
348
+ tcx. sess . time ( "item_types_and_item_bodies_checking" , || {
349
+ join (
350
+ || {
351
+ tcx. sess . time ( "item_types_checking" , || {
352
+ par_for_each ( & tcx. hir ( ) . krate ( ) . modules , |( & module, _) | {
353
+ tcx. ensure ( ) . check_mod_item_types ( tcx. hir ( ) . local_def_id ( module) ) ;
354
+ } ) ;
355
+ } )
356
+ } ,
357
+ || tcx. sess . time ( "item_bodies_checking" , || tcx. typeck_item_bodies ( LOCAL_CRATE ) ) ,
358
+ )
352
359
} ) ;
353
360
354
- tcx. sess . time ( "item_bodies_checking" , || tcx. typeck_item_bodies ( LOCAL_CRATE ) ) ;
355
-
356
361
check_unused:: check_crate ( tcx) ;
357
362
check_for_entry_fn ( tcx) ;
358
363
0 commit comments