@@ -541,7 +541,7 @@ pub trait LintContext {
541541 diagnostic : BuiltinLintDiagnostics ,
542542 ) {
543543 // We first generate a blank diagnostic.
544- self . lookup ( lint, span, msg, |db| {
544+ self . opt_span_lint ( lint, span, msg, |db| {
545545 // Now, set up surrounding context.
546546 diagnostics:: builtin ( self . sess ( ) , diagnostic, db) ;
547547 // Rewrap `db`, and pass control to the user.
@@ -555,7 +555,7 @@ pub trait LintContext {
555555 ///
556556 /// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
557557 #[ rustc_lint_diagnostics]
558- fn lookup < S : Into < MultiSpan > > (
558+ fn opt_span_lint < S : Into < MultiSpan > > (
559559 & self ,
560560 lint : & ' static Lint ,
561561 span : Option < S > ,
@@ -571,7 +571,7 @@ pub trait LintContext {
571571 span : S ,
572572 decorator : impl for < ' a > DecorateLint < ' a , ( ) > ,
573573 ) {
574- self . lookup ( lint, Some ( span) , decorator. msg ( ) , |diag| {
574+ self . opt_span_lint ( lint, Some ( span) , decorator. msg ( ) , |diag| {
575575 decorator. decorate_lint ( diag) ;
576576 } ) ;
577577 }
@@ -587,13 +587,13 @@ pub trait LintContext {
587587 msg : impl Into < DiagnosticMessage > ,
588588 decorate : impl for <' a , ' b > FnOnce ( & ' b mut DiagnosticBuilder < ' a , ( ) > ) ,
589589 ) {
590- self . lookup ( lint, Some ( span) , msg, decorate) ;
590+ self . opt_span_lint ( lint, Some ( span) , msg, decorate) ;
591591 }
592592
593593 /// Emit a lint from a lint struct (some type that implements `DecorateLint`, typically
594594 /// generated by `#[derive(LintDiagnostic)]`).
595595 fn emit_lint ( & self , lint : & ' static Lint , decorator : impl for < ' a > DecorateLint < ' a , ( ) > ) {
596- self . lookup ( lint, None as Option < Span > , decorator. msg ( ) , |diag| {
596+ self . opt_span_lint ( lint, None as Option < Span > , decorator. msg ( ) , |diag| {
597597 decorator. decorate_lint ( diag) ;
598598 } ) ;
599599 }
@@ -608,7 +608,7 @@ pub trait LintContext {
608608 msg : impl Into < DiagnosticMessage > ,
609609 decorate : impl for <' a , ' b > FnOnce ( & ' b mut DiagnosticBuilder < ' a , ( ) > ) ,
610610 ) {
611- self . lookup ( lint, None as Option < Span > , msg, decorate) ;
611+ self . opt_span_lint ( lint, None as Option < Span > , msg, decorate) ;
612612 }
613613
614614 /// This returns the lint level for the given lint at the current location.
@@ -666,7 +666,7 @@ impl<'tcx> LintContext for LateContext<'tcx> {
666666 }
667667
668668 #[ rustc_lint_diagnostics]
669- fn lookup < S : Into < MultiSpan > > (
669+ fn opt_span_lint < S : Into < MultiSpan > > (
670670 & self ,
671671 lint : & ' static Lint ,
672672 span : Option < S > ,
@@ -693,7 +693,7 @@ impl LintContext for EarlyContext<'_> {
693693 }
694694
695695 #[ rustc_lint_diagnostics]
696- fn lookup < S : Into < MultiSpan > > (
696+ fn opt_span_lint < S : Into < MultiSpan > > (
697697 & self ,
698698 lint : & ' static Lint ,
699699 span : Option < S > ,
0 commit comments