@@ -8,34 +8,32 @@ use rustc_middle::hir::nested_filter;
88use rustc_middle:: ty:: TyCtxt ;
99
1010pub fn check_crate ( tcx : TyCtxt < ' _ > ) {
11- tcx. dep_graph . with_ignore ( || {
12- if tcx. sess . opts . unstable_opts . hir_stats {
13- crate :: hir_stats:: print_hir_stats ( tcx) ;
14- }
11+ if tcx. sess . opts . unstable_opts . hir_stats {
12+ crate :: hir_stats:: print_hir_stats ( tcx) ;
13+ }
1514
16- #[ cfg( debug_assertions) ]
17- {
18- let errors = Lock :: new ( Vec :: new ( ) ) ;
15+ #[ cfg( debug_assertions) ]
16+ {
17+ let errors = Lock :: new ( Vec :: new ( ) ) ;
1918
20- tcx. hir ( ) . par_for_each_module ( |module_id| {
21- let mut v = HirIdValidator {
22- tcx,
23- owner : None ,
24- hir_ids_seen : Default :: default ( ) ,
25- errors : & errors,
26- } ;
19+ tcx. hir ( ) . par_for_each_module ( |module_id| {
20+ let mut v = HirIdValidator {
21+ tcx,
22+ owner : None ,
23+ hir_ids_seen : Default :: default ( ) ,
24+ errors : & errors,
25+ } ;
2726
28- tcx. hir ( ) . visit_item_likes_in_module ( module_id, & mut v) ;
29- } ) ;
27+ tcx. hir ( ) . visit_item_likes_in_module ( module_id, & mut v) ;
28+ } ) ;
3029
31- let errors = errors. into_inner ( ) ;
30+ let errors = errors. into_inner ( ) ;
3231
33- if !errors. is_empty ( ) {
34- let message = errors. iter ( ) . fold ( String :: new ( ) , |s1, s2| s1 + "\n " + s2) ;
35- tcx. sess . delay_span_bug ( rustc_span:: DUMMY_SP , & message) ;
36- }
32+ if !errors. is_empty ( ) {
33+ let message = errors. iter ( ) . fold ( String :: new ( ) , |s1, s2| s1 + "\n " + s2) ;
34+ tcx. sess . delay_span_bug ( rustc_span:: DUMMY_SP , & message) ;
3735 }
38- } )
36+ }
3937}
4038
4139struct HirIdValidator < ' a , ' hir > {
0 commit comments