about summary refs log tree commit diff
path: root/compiler/rustc_lint/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-01-16 14:29:28 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-01-23 07:59:45 +1100
commitc56d71f418778a6957d01f54086592b0eb38b170 (patch)
tree886aa518398c09df0e59270b3502322169074d8e /compiler/rustc_lint/src
parentd5fd0997291ca0135401a39dff25c8a9c13b8961 (diff)
downloadrust-c56d71f418778a6957d01f54086592b0eb38b170.tar.gz
rust-c56d71f418778a6957d01f54086592b0eb38b170.zip
Rename `LintContext::struct_span_lint` as `LintContext::span_lint`.
Diffstat (limited to 'compiler/rustc_lint/src')
-rw-r--r--compiler/rustc_lint/src/context.rs2
-rw-r--r--compiler/rustc_lint/src/non_fmt_panic.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs
index ffd8f1b3c79..dca4d14f4bf 100644
--- a/compiler/rustc_lint/src/context.rs
+++ b/compiler/rustc_lint/src/context.rs
@@ -580,7 +580,7 @@ pub trait LintContext {
     ///
     /// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
     #[rustc_lint_diagnostics]
-    fn struct_span_lint<S: Into<MultiSpan>>(
+    fn span_lint<S: Into<MultiSpan>>(
         &self,
         lint: &'static Lint,
         span: S,
diff --git a/compiler/rustc_lint/src/non_fmt_panic.rs b/compiler/rustc_lint/src/non_fmt_panic.rs
index 479acd88d71..72074cd5af3 100644
--- a/compiler/rustc_lint/src/non_fmt_panic.rs
+++ b/compiler/rustc_lint/src/non_fmt_panic.rs
@@ -121,7 +121,7 @@ fn check_panic<'tcx>(cx: &LateContext<'tcx>, f: &'tcx hir::Expr<'tcx>, arg: &'tc
     }
 
     #[allow(rustc::diagnostic_outside_of_impl)]
-    cx.struct_span_lint(NON_FMT_PANICS, arg_span, fluent::lint_non_fmt_panic, |lint| {
+    cx.span_lint(NON_FMT_PANICS, arg_span, fluent::lint_non_fmt_panic, |lint| {
         lint.arg("name", symbol);
         lint.note(fluent::lint_note);
         lint.note(fluent::lint_more_info_note);