1
Fork 0

Rename LintContext::struct_span_lint as LintContext::span_lint.

This commit is contained in:
Nicholas Nethercote 2024-01-16 14:29:28 +11:00
parent d5fd099729
commit c56d71f418
8 changed files with 12 additions and 13 deletions

View file

@ -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,

View file

@ -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);