@@ -3,7 +3,7 @@ use clippy_utils::diagnostics::{span_lint, span_lint_and_help, span_lint_and_sug
33use clippy_utils:: source:: snippet;
44use clippy_utils:: ty:: match_type;
55use clippy_utils:: {
6- is_else_clause, is_expn_of, is_expr_path_def_path, match_def_path, method_calls, path_to_res, paths, run_lints ,
6+ is_else_clause, is_expn_of, is_expr_path_def_path, lints_enabled , match_def_path, method_calls, path_to_res, paths,
77 SpanlessEq ,
88} ;
99use if_chain:: if_chain;
@@ -353,7 +353,7 @@ impl_lint_pass!(LintWithoutLintPass => [DEFAULT_LINT, LINT_WITHOUT_LINT_PASS]);
353353
354354impl < ' tcx > LateLintPass < ' tcx > for LintWithoutLintPass {
355355 fn check_item ( & mut self , cx : & LateContext < ' tcx > , item : & ' tcx Item < ' _ > ) {
356- if !run_lints ( cx, & [ DEFAULT_LINT ] , item. hir_id ( ) ) {
356+ if !lints_enabled ( cx, & [ DEFAULT_LINT ] , item. hir_id ( ) ) {
357357 return ;
358358 }
359359
@@ -411,7 +411,7 @@ impl<'tcx> LateLintPass<'tcx> for LintWithoutLintPass {
411411 }
412412
413413 fn check_crate_post ( & mut self , cx : & LateContext < ' tcx > , _: & ' tcx Crate < ' _ > ) {
414- if !run_lints ( cx, & [ LINT_WITHOUT_LINT_PASS ] , CRATE_HIR_ID ) {
414+ if !lints_enabled ( cx, & [ LINT_WITHOUT_LINT_PASS ] , CRATE_HIR_ID ) {
415415 return ;
416416 }
417417
@@ -497,7 +497,7 @@ impl_lint_pass!(CompilerLintFunctions => [COMPILER_LINT_FUNCTIONS]);
497497
498498impl < ' tcx > LateLintPass < ' tcx > for CompilerLintFunctions {
499499 fn check_expr ( & mut self , cx : & LateContext < ' tcx > , expr : & ' tcx Expr < ' _ > ) {
500- if !run_lints ( cx, & [ COMPILER_LINT_FUNCTIONS ] , expr. hir_id ) {
500+ if !lints_enabled ( cx, & [ COMPILER_LINT_FUNCTIONS ] , expr. hir_id ) {
501501 return ;
502502 }
503503
@@ -526,7 +526,7 @@ declare_lint_pass!(OuterExpnDataPass => [OUTER_EXPN_EXPN_DATA]);
526526
527527impl < ' tcx > LateLintPass < ' tcx > for OuterExpnDataPass {
528528 fn check_expr ( & mut self , cx : & LateContext < ' tcx > , expr : & ' tcx hir:: Expr < ' _ > ) {
529- if !run_lints ( cx, & [ OUTER_EXPN_EXPN_DATA ] , expr. hir_id ) {
529+ if !lints_enabled ( cx, & [ OUTER_EXPN_EXPN_DATA ] , expr. hir_id ) {
530530 return ;
531531 }
532532
@@ -576,7 +576,7 @@ declare_lint_pass!(CollapsibleCalls => [COLLAPSIBLE_SPAN_LINT_CALLS]);
576576
577577impl < ' tcx > LateLintPass < ' tcx > for CollapsibleCalls {
578578 fn check_expr ( & mut self , cx : & LateContext < ' tcx > , expr : & ' tcx hir:: Expr < ' _ > ) {
579- if !run_lints ( cx, & [ COLLAPSIBLE_SPAN_LINT_CALLS ] , expr. hir_id ) {
579+ if !lints_enabled ( cx, & [ COLLAPSIBLE_SPAN_LINT_CALLS ] , expr. hir_id ) {
580580 return ;
581581 }
582582
@@ -757,7 +757,7 @@ declare_lint_pass!(MatchTypeOnDiagItem => [MATCH_TYPE_ON_DIAGNOSTIC_ITEM]);
757757
758758impl < ' tcx > LateLintPass < ' tcx > for MatchTypeOnDiagItem {
759759 fn check_expr ( & mut self , cx : & LateContext < ' tcx > , expr : & ' tcx hir:: Expr < ' _ > ) {
760- if !run_lints ( cx, & [ MATCH_TYPE_ON_DIAGNOSTIC_ITEM ] , expr. hir_id ) {
760+ if !lints_enabled ( cx, & [ MATCH_TYPE_ON_DIAGNOSTIC_ITEM ] , expr. hir_id ) {
761761 return ;
762762 }
763763
0 commit comments