From f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Tue, 9 Jul 2024 22:30:26 +0000 Subject: Show diff suggestion format on verbose replacement ``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL - let _ = 2.l; LL + let _ = 2.0f64; | ``` --- compiler/rustc_errors/src/emitter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_errors/src') diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index 15cf285e7ff..4824dc098ad 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -1982,7 +1982,7 @@ impl HumanEmitter { { debug!(?complete, ?parts, ?highlights); - let has_deletion = parts.iter().any(|p| p.is_deletion(sm)); + let has_deletion = parts.iter().any(|p| p.is_deletion(sm) || p.is_replacement(sm)); let is_multiline = complete.lines().count() > 1; if i == 0 { -- cgit 1.4.1-3-g733a5