@@ -913,10 +913,10 @@ fn analysis(tcx: TyCtxt<'_>, cnum: CrateNum) -> Result<()> {
913
913
} ) ;
914
914
} , {
915
915
par_iter( & tcx. hir( ) . krate( ) . modules) . for_each( |( & module, _) | {
916
- tcx. ensure ( ) . check_mod_loops ( tcx . hir( ) . local_def_id_from_node_id ( module) ) ;
917
- tcx. ensure( ) . check_mod_attrs ( tcx . hir ( ) . local_def_id_from_node_id ( module ) ) ;
918
- tcx. ensure( ) . check_mod_unstable_api_usage (
919
- tcx. hir ( ) . local_def_id_from_node_id ( module ) ) ;
916
+ let local_def_id = tcx. hir( ) . local_def_id ( module) ;
917
+ tcx. ensure( ) . check_mod_loops ( local_def_id ) ;
918
+ tcx. ensure( ) . check_mod_attrs ( local_def_id ) ;
919
+ tcx. ensure ( ) . check_mod_unstable_api_usage ( local_def_id ) ;
920
920
} ) ;
921
921
} ) ;
922
922
} ) ;
@@ -939,9 +939,10 @@ fn analysis(tcx: TyCtxt<'_>, cnum: CrateNum) -> Result<()> {
939
939
// "not all control paths return a value" is reported here.
940
940
//
941
941
// maybe move the check to a MIR pass?
942
- tcx. ensure ( ) . check_mod_liveness ( tcx . hir( ) . local_def_id_from_node_id ( module) ) ;
942
+ let local_def_id = tcx. hir( ) . local_def_id ( module) ;
943
943
944
- tcx. ensure( ) . check_mod_intrinsics( tcx. hir( ) . local_def_id_from_node_id( module) ) ;
944
+ tcx. ensure( ) . check_mod_liveness( local_def_id) ;
945
+ tcx. ensure( ) . check_mod_intrinsics( local_def_id) ;
945
946
} ) ;
946
947
} ) ;
947
948
} ) ;
@@ -1001,7 +1002,7 @@ fn analysis(tcx: TyCtxt<'_>, cnum: CrateNum) -> Result<()> {
1001
1002
} , {
1002
1003
time( sess, "privacy checking modules" , || {
1003
1004
par_iter( & tcx. hir( ) . krate( ) . modules) . for_each( |( & module, _) | {
1004
- tcx. ensure( ) . check_mod_privacy( tcx. hir( ) . local_def_id_from_node_id ( module) ) ;
1005
+ tcx. ensure( ) . check_mod_privacy( tcx. hir( ) . local_def_id ( module) ) ;
1005
1006
} ) ;
1006
1007
} ) ;
1007
1008
} ) ;
0 commit comments