Skip to content

Commit 77b1e1e

Browse files
committed
Rename LintContext::lookup_with_diagnostics as LintContext::span_lint_with_diagnostics.
1 parent 1a809b2 commit 77b1e1e

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

compiler/rustc_lint/src/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2829,7 +2829,7 @@ impl<'tcx> LateLintPass<'tcx> for NamedAsmLabels {
28292829
let target_spans: MultiSpan =
28302830
if spans.len() > 0 { spans.into() } else { (*template_span).into() };
28312831

2832-
cx.lookup_with_diagnostics(
2832+
cx.span_lint_with_diagnostics(
28332833
NAMED_ASM_LABELS,
28342834
Some(target_spans),
28352835
fluent::lint_builtin_asm_labels,

compiler/rustc_lint/src/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ pub trait LintContext {
532532
///
533533
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
534534
#[rustc_lint_diagnostics]
535-
fn lookup_with_diagnostics(
535+
fn span_lint_with_diagnostics(
536536
&self,
537537
lint: &'static Lint,
538538
span: Option<impl Into<MultiSpan>>,

compiler/rustc_lint/src/early.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@ impl<'a, T: EarlyLintPass> EarlyContextAndPass<'a, T> {
4545
fn inlined_check_id(&mut self, id: ast::NodeId) {
4646
for early_lint in self.context.buffered.take(id) {
4747
let BufferedEarlyLint { span, msg, node_id: _, lint_id, diagnostic } = early_lint;
48-
self.context.lookup_with_diagnostics(lint_id.lint, Some(span), msg, |_| {}, diagnostic);
48+
self.context.span_lint_with_diagnostics(
49+
lint_id.lint,
50+
Some(span),
51+
msg,
52+
|_| {},
53+
diagnostic,
54+
);
4955
}
5056
}
5157

0 commit comments

Comments
 (0)