@@ -541,7 +541,7 @@ pub trait LintContext {
541
541
diagnostic: BuiltinLintDiagnostics,
542
542
) {
543
543
// We first generate a blank diagnostic.
544
- self.lookup (lint, span, msg, |db| {
544
+ self.opt_span_lint (lint, span, msg, |db| {
545
545
// Now, set up surrounding context.
546
546
diagnostics::builtin(self.sess(), diagnostic, db);
547
547
// Rewrap `db`, and pass control to the user.
@@ -555,7 +555,7 @@ pub trait LintContext {
555
555
///
556
556
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
557
557
#[rustc_lint_diagnostics]
558
- fn lookup <S: Into<MultiSpan>>(
558
+ fn opt_span_lint <S: Into<MultiSpan>>(
559
559
&self,
560
560
lint: &'static Lint,
561
561
span: Option<S>,
@@ -571,7 +571,7 @@ pub trait LintContext {
571
571
span: S,
572
572
decorator: impl for<'a> DecorateLint<'a, ()>,
573
573
) {
574
- self.lookup (lint, Some(span), decorator.msg(), |diag| {
574
+ self.opt_span_lint (lint, Some(span), decorator.msg(), |diag| {
575
575
decorator.decorate_lint(diag);
576
576
});
577
577
}
@@ -587,13 +587,13 @@ pub trait LintContext {
587
587
msg: impl Into<DiagnosticMessage>,
588
588
decorate: impl for<'a, 'b> FnOnce(&'b mut DiagnosticBuilder<'a, ()>),
589
589
) {
590
- self.lookup (lint, Some(span), msg, decorate);
590
+ self.opt_span_lint (lint, Some(span), msg, decorate);
591
591
}
592
592
593
593
/// Emit a lint from a lint struct (some type that implements `DecorateLint`, typically
594
594
/// generated by `#[derive(LintDiagnostic)]`).
595
595
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| {
597
597
decorator.decorate_lint(diag);
598
598
});
599
599
}
@@ -608,7 +608,7 @@ pub trait LintContext {
608
608
msg: impl Into<DiagnosticMessage>,
609
609
decorate: impl for<'a, 'b> FnOnce(&'b mut DiagnosticBuilder<'a, ()>),
610
610
) {
611
- self.lookup (lint, None as Option<Span>, msg, decorate);
611
+ self.opt_span_lint (lint, None as Option<Span>, msg, decorate);
612
612
}
613
613
614
614
/// This returns the lint level for the given lint at the current location.
@@ -666,7 +666,7 @@ impl<'tcx> LintContext for LateContext<'tcx> {
666
666
}
667
667
668
668
#[rustc_lint_diagnostics]
669
- fn lookup <S: Into<MultiSpan>>(
669
+ fn opt_span_lint <S: Into<MultiSpan>>(
670
670
&self,
671
671
lint: &'static Lint,
672
672
span: Option<S>,
@@ -693,7 +693,7 @@ impl LintContext for EarlyContext<'_> {
693
693
}
694
694
695
695
#[rustc_lint_diagnostics]
696
- fn lookup <S: Into<MultiSpan>>(
696
+ fn opt_span_lint <S: Into<MultiSpan>>(
697
697
&self,
698
698
lint: &'static Lint,
699
699
span: Option<S>,
0 commit comments