@@ -8,34 +8,32 @@ use rustc_middle::hir::nested_filter;
8
8
use rustc_middle:: ty:: TyCtxt ;
9
9
10
10
pub 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
+ }
15
14
16
- #[ cfg( debug_assertions) ]
17
- {
18
- let errors = Lock :: new ( Vec :: new ( ) ) ;
15
+ #[ cfg( debug_assertions) ]
16
+ {
17
+ let errors = Lock :: new ( Vec :: new ( ) ) ;
19
18
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
+ } ;
27
26
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
+ } ) ;
30
29
31
- let errors = errors. into_inner ( ) ;
30
+ let errors = errors. into_inner ( ) ;
32
31
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) ;
37
35
}
38
- } )
36
+ }
39
37
}
40
38
41
39
struct HirIdValidator < ' a , ' hir > {
0 commit comments