Rename LintContext::lookup_with_diagnostics
as LintContext::span_lint_with_diagnostics
.
This commit is contained in:
parent
2de5242ea6
commit
c915e90f7e
@ -2849,7 +2849,7 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) {
|
||||
let target_spans: MultiSpan =
|
||||
if spans.len() > 0 { spans.into() } else { (*template_span).into() };
|
||||
|
||||
cx.lookup_with_diagnostics(
|
||||
cx.span_lint_with_diagnostics(
|
||||
NAMED_ASM_LABELS,
|
||||
Some(target_spans),
|
||||
fluent::lint_builtin_asm_labels,
|
||||
|
@ -532,7 +532,7 @@ pub trait LintContext {
|
||||
///
|
||||
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
|
||||
#[rustc_lint_diagnostics]
|
||||
fn lookup_with_diagnostics(
|
||||
fn span_lint_with_diagnostics(
|
||||
&self,
|
||||
lint: &'static Lint,
|
||||
span: Option<impl Into<MultiSpan>>,
|
||||
|
@ -45,7 +45,13 @@ impl<'a, T: EarlyLintPass> EarlyContextAndPass<'a, T> {
|
||||
fn inlined_check_id(&mut self, id: ast::NodeId) {
|
||||
for early_lint in self.context.buffered.take(id) {
|
||||
let BufferedEarlyLint { span, msg, node_id: _, lint_id, diagnostic } = early_lint;
|
||||
self.context.lookup_with_diagnostics(lint_id.lint, Some(span), msg, |_| {}, diagnostic);
|
||||
self.context.span_lint_with_diagnostics(
|
||||
lint_id.lint,
|
||||
Some(span),
|
||||
msg,
|
||||
|_| {},
|
||||
diagnostic,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user