about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/ptr_nulls.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-01-16 14:40:39 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-01-23 08:08:25 +1100
commit1881bfaa2b4e1f006db30aa408aaf360557ab2e9 (patch)
treef0514fc30797f11b7a16c9de1aa5c12d9a8bcfca /compiler/rustc_lint/src/ptr_nulls.rs
parentc915e90f7ee79005b45fb4428784c85ac1116726 (diff)
downloadrust-1881bfaa2b4e1f006db30aa408aaf360557ab2e9.tar.gz
rust-1881bfaa2b4e1f006db30aa408aaf360557ab2e9.zip
Rename `LintContext::emit_spanned_lint` as `LintContext::emit_span_lint`.
Diffstat (limited to 'compiler/rustc_lint/src/ptr_nulls.rs')
-rw-r--r--compiler/rustc_lint/src/ptr_nulls.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_lint/src/ptr_nulls.rs b/compiler/rustc_lint/src/ptr_nulls.rs
index 4ac8a5ceb85..8038115ef51 100644
--- a/compiler/rustc_lint/src/ptr_nulls.rs
+++ b/compiler/rustc_lint/src/ptr_nulls.rs
@@ -97,7 +97,7 @@ impl<'tcx> LateLintPass<'tcx> for PtrNullChecks {
                     )
                     && let Some(diag) = incorrect_check(cx, arg) =>
             {
-                cx.emit_spanned_lint(USELESS_PTR_NULL_CHECKS, expr.span, diag)
+                cx.emit_span_lint(USELESS_PTR_NULL_CHECKS, expr.span, diag)
             }
 
             // Catching:
@@ -110,7 +110,7 @@ impl<'tcx> LateLintPass<'tcx> for PtrNullChecks {
                     )
                     && let Some(diag) = incorrect_check(cx, receiver) =>
             {
-                cx.emit_spanned_lint(USELESS_PTR_NULL_CHECKS, expr.span, diag)
+                cx.emit_span_lint(USELESS_PTR_NULL_CHECKS, expr.span, diag)
             }
 
             ExprKind::Binary(op, left, right) if matches!(op.node, BinOpKind::Eq) => {
@@ -134,7 +134,7 @@ impl<'tcx> LateLintPass<'tcx> for PtrNullChecks {
                             && let LitKind::Int(v, _) = spanned.node
                             && v == 0 =>
                     {
-                        cx.emit_spanned_lint(USELESS_PTR_NULL_CHECKS, expr.span, diag)
+                        cx.emit_span_lint(USELESS_PTR_NULL_CHECKS, expr.span, diag)
                     }
 
                     // Catching:
@@ -145,7 +145,7 @@ impl<'tcx> LateLintPass<'tcx> for PtrNullChecks {
                             && let Some(diag_item) = cx.tcx.get_diagnostic_name(def_id)
                             && (diag_item == sym::ptr_null || diag_item == sym::ptr_null_mut) =>
                     {
-                        cx.emit_spanned_lint(USELESS_PTR_NULL_CHECKS, expr.span, diag)
+                        cx.emit_span_lint(USELESS_PTR_NULL_CHECKS, expr.span, diag)
                     }
 
                     _ => {}