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 88use rustc:: traits;
99use rustc:: ty:: query:: Providers ;
1010use rustc:: ty:: { self , TyCtxt , TypeFoldable } ;
11+ use rustc_data_structures:: sync:: par_for_each;
1112use rustc_error_codes:: * ;
1213use rustc_errors:: struct_span_err;
1314use rustc_hir:: def_id:: { DefId , LOCAL_CRATE } ;
@@ -141,9 +142,9 @@ fn coherent_trait(tcx: TyCtxt<'_>, def_id: DefId) {
141142}
142143
143144pub 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 , _ ) | {
145146 tcx. ensure ( ) . coherent_trait ( trait_def_id) ;
146- }
147+ } ) ;
147148
148149 tcx. sess . time ( "unsafety_checking" , || unsafety:: check ( tcx) ) ;
149150 tcx. sess . time ( "orphan_checking" , || orphan:: check ( tcx) ) ;
You can’t perform that action at this time.
0 commit comments