File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/librustc_typeck/coherence Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 8
8
use rustc:: traits;
9
9
use rustc:: ty:: query:: Providers ;
10
10
use rustc:: ty:: { self , TyCtxt , TypeFoldable } ;
11
+ use rustc_data_structures:: sync:: par_for_each;
11
12
use rustc_errors:: struct_span_err;
12
13
use rustc_hir:: def_id:: { DefId , LOCAL_CRATE } ;
13
14
use rustc_hir:: HirId ;
@@ -140,9 +141,9 @@ fn coherent_trait(tcx: TyCtxt<'_>, def_id: DefId) {
140
141
}
141
142
142
143
pub fn check_coherence ( tcx : TyCtxt < ' _ > ) {
143
- for & trait_def_id in tcx. hir ( ) . krate ( ) . trait_impls . keys ( ) {
144
+ par_for_each ( & tcx. hir ( ) . krate ( ) . trait_impls , | ( & trait_def_id , _ ) | {
144
145
tcx. ensure ( ) . coherent_trait ( trait_def_id) ;
145
- }
146
+ } ) ;
146
147
147
148
tcx. sess . time ( "unsafety_checking" , || unsafety:: check ( tcx) ) ;
148
149
tcx. sess . time ( "orphan_checking" , || orphan:: check ( tcx) ) ;
You can’t perform that action at this time.
0 commit comments