diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-01-16 14:34:58 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-01-23 07:59:45 +1100 |
| commit | c915e90f7ee79005b45fb4428784c85ac1116726 (patch) | |
| tree | b114cd21c24ef1e56be4123f9083d693f6053f3a /compiler/rustc_lint | |
| parent | 2de5242ea651d57c6496c720e12fdf8b2fa6f2c1 (diff) | |
| download | rust-c915e90f7ee79005b45fb4428784c85ac1116726.tar.gz rust-c915e90f7ee79005b45fb4428784c85ac1116726.zip | |
Rename `LintContext::lookup_with_diagnostics` as `LintContext::span_lint_with_diagnostics`.
Diffstat (limited to 'compiler/rustc_lint')
| -rw-r--r-- | compiler/rustc_lint/src/builtin.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/context.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/early.rs | 8 |
3 files changed, 9 insertions, 3 deletions
diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 2ce78152cc2..113437ad1f1 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -2849,7 +2849,7 @@ impl<'tcx> LateLintPass<'tcx> for NamedAsmLabels { 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, diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs index c96258b788e..8b063de4114 100644 --- a/compiler/rustc_lint/src/context.rs +++ b/compiler/rustc_lint/src/context.rs @@ -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>>, diff --git a/compiler/rustc_lint/src/early.rs b/compiler/rustc_lint/src/early.rs index 70af6572246..5ae080d4702 100644 --- a/compiler/rustc_lint/src/early.rs +++ b/compiler/rustc_lint/src/early.rs @@ -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, + ); } } |
