File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -364,14 +364,14 @@ pub fn late_lint_mod<'tcx, T: LateLintPass<'tcx> + 'tcx>(
364
364
// Note: `passes` is often empty. In that case, it's faster to run
365
365
// `builtin_lints` directly rather than bundling it up into the
366
366
// `RuntimeCombinedLateLintPass`.
367
- let mut passes: Vec < _ > = unerased_lint_store ( tcx. sess )
368
- . late_module_passes
369
- . iter ( )
370
- . map ( |mk_pass| ( mk_pass) ( tcx) )
371
- . collect ( ) ;
372
- if passes. is_empty ( ) {
367
+ let late_module_passes = & unerased_lint_store ( tcx. sess ) . late_module_passes ;
368
+ if late_module_passes. is_empty ( ) {
373
369
late_lint_mod_inner ( tcx, module_def_id, context, builtin_lints) ;
374
370
} else {
371
+ let mut passes: Vec < _ > = late_module_passes
372
+ . iter ( )
373
+ . map ( |mk_pass| ( mk_pass) ( tcx) )
374
+ . collect ( ) ;
375
375
passes. push ( Box :: new ( builtin_lints) ) ;
376
376
let pass = RuntimeCombinedLateLintPass { passes : & mut passes[ ..] } ;
377
377
late_lint_mod_inner ( tcx, module_def_id, context, pass) ;
You can’t perform that action at this time.
0 commit comments