Rename LintContext::lookup_with_diagnostics
as LintContext::span_lint_with_diagnostics
.
This commit is contained in:
parent
2de5242ea6
commit
c915e90f7e
3 changed files with 9 additions and 3 deletions
|
@ -2849,7 +2849,7 @@ impl<'tcx> LateLintPass<'tcx> for NamedAsmLabels {
|
||||||
let target_spans: MultiSpan =
|
let target_spans: MultiSpan =
|
||||||
if spans.len() > 0 { spans.into() } else { (*template_span).into() };
|
if spans.len() > 0 { spans.into() } else { (*template_span).into() };
|
||||||
|
|
||||||
cx.lookup_with_diagnostics(
|
cx.span_lint_with_diagnostics(
|
||||||
NAMED_ASM_LABELS,
|
NAMED_ASM_LABELS,
|
||||||
Some(target_spans),
|
Some(target_spans),
|
||||||
fluent::lint_builtin_asm_labels,
|
fluent::lint_builtin_asm_labels,
|
||||||
|
|
|
@ -532,7 +532,7 @@ pub trait LintContext {
|
||||||
///
|
///
|
||||||
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
|
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
|
||||||
#[rustc_lint_diagnostics]
|
#[rustc_lint_diagnostics]
|
||||||
fn lookup_with_diagnostics(
|
fn span_lint_with_diagnostics(
|
||||||
&self,
|
&self,
|
||||||
lint: &'static Lint,
|
lint: &'static Lint,
|
||||||
span: Option<impl Into<MultiSpan>>,
|
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) {
|
fn inlined_check_id(&mut self, id: ast::NodeId) {
|
||||||
for early_lint in self.context.buffered.take(id) {
|
for early_lint in self.context.buffered.take(id) {
|
||||||
let BufferedEarlyLint { span, msg, node_id: _, lint_id, diagnostic } = early_lint;
|
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…
Add table
Add a link
Reference in a new issue