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_error_codes:: * ;
12
13
use rustc_errors:: struct_span_err;
13
14
use rustc_hir:: def_id:: { DefId , LOCAL_CRATE } ;
@@ -141,9 +142,9 @@ fn coherent_trait(tcx: TyCtxt<'_>, def_id: DefId) {
141
142
}
142
143
143
144
pub fn check_coherence ( tcx : TyCtxt < ' _ > ) {
144
- for & trait_def_id in tcx. hir ( ) . krate ( ) . trait_impls . keys ( ) {
145
+ par_for_each ( & tcx. hir ( ) . krate ( ) . trait_impls , | ( & trait_def_id , _ ) | {
145
146
tcx. ensure ( ) . coherent_trait ( trait_def_id) ;
146
- }
147
+ } ) ;
147
148
148
149
tcx. sess . time ( "unsafety_checking" , || unsafety:: check ( tcx) ) ;
149
150
tcx. sess . time ( "orphan_checking" , || orphan:: check ( tcx) ) ;
You can’t perform that action at this time.
0 commit comments