diff options
Diffstat (limited to 'compiler/rustc_lint/src/ptr_nulls.rs')
| -rw-r--r-- | compiler/rustc_lint/src/ptr_nulls.rs | 8 | 
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) } _ => {} | 
