diff --git a/compiler/rustc_hir_analysis/src/check/expr.rs b/compiler/rustc_hir_analysis/src/check/expr.rs index 48a4f40780bf..d7009c564447 100644 --- a/compiler/rustc_hir_analysis/src/check/expr.rs +++ b/compiler/rustc_hir_analysis/src/check/expr.rs @@ -1066,9 +1066,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { } if eq { err.span_suggestion_verbose( - span, + span.shrink_to_hi(), "you might have meant to compare for equality", - "==", + '=', applicability, ); }