about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-02-13 02:54:07 +0000
committerJubilee Young <workingjubilee@gmail.com>2025-02-14 00:27:13 -0800
commitb480a9214a7037813d29bc04d9e9dbe92ce10cf3 (patch)
tree748aa792f61b46d7c679f157c8c8a3ad9df380f6
parent6dfeab5c9e8a17a6636c1479037baabc4b1e9562 (diff)
downloadrust-b480a9214a7037813d29bc04d9e9dbe92ce10cf3.tar.gz
rust-b480a9214a7037813d29bc04d9e9dbe92ce10cf3.zip
Use underline suggestions for purely 'additive' replacements
-rw-r--r--compiler/rustc_errors/src/emitter.rs3
-rw-r--r--compiler/rustc_errors/src/lib.rs11
-rw-r--r--tests/ui/associated-types/defaults-suitability.current.stderr5
-rw-r--r--tests/ui/associated-types/defaults-suitability.next.stderr5
-rw-r--r--tests/ui/associated-types/issue-38821.stderr10
-rw-r--r--tests/ui/associated-types/issue-54108.current.stderr5
-rw-r--r--tests/ui/associated-types/issue-54108.next.stderr5
-rw-r--r--tests/ui/attributes/rustc_confusables.stderr5
-rw-r--r--tests/ui/attributes/rustc_confusables_std_cases.stderr10
-rw-r--r--tests/ui/borrowck/issue-115259-suggest-iter-mut.stderr5
-rw-r--r--tests/ui/borrowck/issue-62387-suggest-iter-mut-2.stderr5
-rw-r--r--tests/ui/borrowck/issue-62387-suggest-iter-mut.stderr10
-rw-r--r--tests/ui/c-variadic/issue-86053-1.stderr5
-rw-r--r--tests/ui/cfg/cfg-method-receiver.stderr5
-rw-r--r--tests/ui/check-cfg/diagnotics.cargo.stderr5
-rw-r--r--tests/ui/check-cfg/diagnotics.rustc.stderr5
-rw-r--r--tests/ui/closures/2229_closure_analysis/bad-pattern.stderr5
-rw-r--r--tests/ui/closures/issue-78720.stderr5
-rw-r--r--tests/ui/compare-method/bad-self-type.stderr5
-rw-r--r--tests/ui/const-generics/ensure_is_evaluatable.stderr5
-rw-r--r--tests/ui/const-generics/fn_with_two_const_inputs.stderr5
-rw-r--r--tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-3.stderr20
-rw-r--r--tests/ui/const-generics/generic_const_exprs/assoc_const_unification/doesnt_unify_evaluatable.stderr5
-rw-r--r--tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.stderr5
-rw-r--r--tests/ui/const-generics/generic_const_exprs/const_kind_expr/wf_obligation.stderr5
-rw-r--r--tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr5
-rw-r--r--tests/ui/consts/const-pattern-irrefutable.stderr15
-rw-r--r--tests/ui/did_you_mean/dont-suggest-hygienic-fields.stderr5
-rw-r--r--tests/ui/dropck/explicit-drop-bounds.bad1.stderr10
-rw-r--r--tests/ui/dst/issue-90528-unsizing-suggestion-3.stderr5
-rw-r--r--tests/ui/empty/empty-struct-braces-expr.stderr10
-rw-r--r--tests/ui/empty/empty-struct-tuple-pat.stderr5
-rw-r--r--tests/ui/extern/not-in-block.stderr10
-rw-r--r--tests/ui/fmt/no-inline-literals-out-of-range.stderr5
-rw-r--r--tests/ui/impl-trait/no-method-suggested-traits.stderr30
-rw-r--r--tests/ui/imports/glob-resolve1.stderr5
-rw-r--r--tests/ui/imports/issue-45829/import-self.stderr5
-rw-r--r--tests/ui/issues/issue-32004.stderr5
-rw-r--r--tests/ui/issues/issue-41652/issue-41652.stderr5
-rw-r--r--tests/ui/issues/issue-51874.stderr5
-rw-r--r--tests/ui/issues/issue-5358-1.stderr5
-rw-r--r--tests/ui/issues/issue-56175.stderr5
-rw-r--r--tests/ui/lint/let_underscore/issue-119696-err-on-fn.stderr5
-rw-r--r--tests/ui/lint/let_underscore/issue-119697-extra-let.stderr5
-rw-r--r--tests/ui/lint/let_underscore/let_underscore_drop.stderr5
-rw-r--r--tests/ui/lint/let_underscore/let_underscore_lock.stderr20
-rw-r--r--tests/ui/lint/static-mut-refs.e2021.stderr30
-rw-r--r--tests/ui/lint/static-mut-refs.e2024.stderr30
-rw-r--r--tests/ui/lint/type-overflow.stderr10
-rw-r--r--tests/ui/lint/unused/issue-67691-unused-field-in-or-pattern.stderr10
-rw-r--r--tests/ui/lint/wide_pointer_comparisons.stderr5
-rw-r--r--tests/ui/macros/expr_2021_cargo_fix_edition.stderr10
-rw-r--r--tests/ui/macros/macro-backtrace-invalid-internals.stderr10
-rw-r--r--tests/ui/methods/issues/issue-90315.stderr5
-rw-r--r--tests/ui/methods/method-on-ambiguous-numeric-type.stderr5
-rw-r--r--tests/ui/mir/issue-112269.stderr10
-rw-r--r--tests/ui/moves/use_of_moved_value_copy_suggestions.stderr5
-rw-r--r--tests/ui/nll/ty-outlives/projection-no-regions-closure.stderr10
-rw-r--r--tests/ui/nll/ty-outlives/projection-no-regions-fn.stderr10
-rw-r--r--tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr10
-rw-r--r--tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr5
-rw-r--r--tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr5
-rw-r--r--tests/ui/parser/char/whitespace-character-literal.stderr5
-rw-r--r--tests/ui/parser/extern-no-fn.stderr5
-rw-r--r--tests/ui/parser/issues/issue-87086-colon-path-sep.stderr30
-rw-r--r--tests/ui/parser/missing-fn-issue-65381-2.stderr5
-rw-r--r--tests/ui/parser/misspelled-keywords/const.stderr5
-rw-r--r--tests/ui/parser/recover/turbofish-arg-with-stray-colon.stderr5
-rw-r--r--tests/ui/parser/use-colon-as-mod-sep.stderr20
-rw-r--r--tests/ui/pattern/pat-tuple-field-count-cross.stderr5
-rw-r--r--tests/ui/pattern/pat-tuple-overfield.stderr5
-rw-r--r--tests/ui/pattern/patkind-ref-binding-issue-114896.stderr5
-rw-r--r--tests/ui/pattern/patkind-ref-binding-issue-122415.stderr5
-rw-r--r--tests/ui/privacy/privacy5.stderr50
-rw-r--r--tests/ui/pub/pub-ident-fn-or-struct.stderr5
-rw-r--r--tests/ui/resolve/issue-39226.stderr5
-rw-r--r--tests/ui/resolve/issue-55673.stderr5
-rw-r--r--tests/ui/resolve/issue-73427.stderr35
-rw-r--r--tests/ui/resolve/privacy-enum-ctor.stderr5
-rw-r--r--tests/ui/resolve/resolve-issue-135614-assoc-const.import_trait_associated_functions.stderr5
-rw-r--r--tests/ui/resolve/resolve-issue-135614-assoc-const.normal.stderr5
-rw-r--r--tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr5
-rw-r--r--tests/ui/resolve/typo-suggestion-mistyped-in-path.stderr5
-rw-r--r--tests/ui/stability-attribute/const-stability-attribute-implies-using-stable.stderr5
-rw-r--r--tests/ui/stability-attribute/const-stability-attribute-implies-using-unstable.stderr5
-rw-r--r--tests/ui/stability-attribute/stability-attribute-implies-using-stable.stderr5
-rw-r--r--tests/ui/stability-attribute/stability-attribute-implies-using-unstable.stderr5
-rw-r--r--tests/ui/statics/issue-15261.stderr5
-rw-r--r--tests/ui/statics/static-mut-shared-parens.stderr5
-rw-r--r--tests/ui/statics/static-mut-xc.stderr5
-rw-r--r--tests/ui/statics/static-recursive.stderr5
-rw-r--r--tests/ui/structs/struct-fields-hints-no-dupe.stderr5
-rw-r--r--tests/ui/suggestions/bound-suggestions.stderr5
-rw-r--r--tests/ui/suggestions/const-pat-non-exaustive-let-new-var.stderr5
-rw-r--r--tests/ui/suggestions/crate-or-module-typo.stderr10
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.stderr5
-rw-r--r--tests/ui/suggestions/field-access.stderr15
-rw-r--r--tests/ui/suggestions/imm-ref-trait-object-literal.stderr5
-rw-r--r--tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr20
-rw-r--r--tests/ui/suggestions/recover-missing-turbofish-surrounding-angle-braket.stderr5
-rw-r--r--tests/ui/suggestions/struct-field-type-including-single-colon.stderr10
-rw-r--r--tests/ui/suggestions/suggest-change-mut.stderr5
-rw-r--r--tests/ui/suggestions/suggest-methods.stderr5
-rw-r--r--tests/ui/suggestions/suggest-variants.stderr10
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-path-2.stderr5
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr5
-rw-r--r--tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.stderr15
-rw-r--r--tests/ui/transmutability/assoc-bound.stderr5
-rw-r--r--tests/ui/typeck/issue-29181.stderr5
-rw-r--r--tests/ui/typeck/method-chain-gats.stderr5
110 files changed, 369 insertions, 535 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs
index 4824dc098ad..7d58e6f29da 100644
--- a/compiler/rustc_errors/src/emitter.rs
+++ b/compiler/rustc_errors/src/emitter.rs
@@ -1982,7 +1982,8 @@ impl HumanEmitter {
         {
             debug!(?complete, ?parts, ?highlights);
 
-            let has_deletion = parts.iter().any(|p| p.is_deletion(sm) || p.is_replacement(sm));
+            let has_deletion =
+                parts.iter().any(|p| p.is_deletion(sm) || p.is_destructive_replacement(sm));
             let is_multiline = complete.lines().count() > 1;
 
             if i == 0 {
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs
index 9af17db9a6e..4a186565a7b 100644
--- a/compiler/rustc_errors/src/lib.rs
+++ b/compiler/rustc_errors/src/lib.rs
@@ -230,6 +230,17 @@ impl SubstitutionPart {
         !self.snippet.is_empty() && self.replaces_meaningful_content(sm)
     }
 
+    /// Whether this is a replacement that overwrites source with a snippet
+    /// in a way that isn't a superset of the original string. For example,
+    /// replacing "abc" with "abcde" is not destructive, but replacing it
+    /// it with "abx" is, since the "c" character is lost.
+    pub fn is_destructive_replacement(&self, sm: &SourceMap) -> bool {
+        self.is_replacement(sm)
+            && !sm
+                .span_to_snippet(self.span)
+                .is_ok_and(|snippet| self.snippet.trim_start().starts_with(snippet.trim_start()))
+    }
+
     fn replaces_meaningful_content(&self, sm: &SourceMap) -> bool {
         sm.span_to_snippet(self.span)
             .map_or(!self.span.is_empty(), |snippet| !snippet.trim().is_empty())
diff --git a/tests/ui/associated-types/defaults-suitability.current.stderr b/tests/ui/associated-types/defaults-suitability.current.stderr
index b9ea541e981..61247cee1f3 100644
--- a/tests/ui/associated-types/defaults-suitability.current.stderr
+++ b/tests/ui/associated-types/defaults-suitability.current.stderr
@@ -134,9 +134,8 @@ LL |     type Baz = T;
    |          --- required by a bound in this associated type
 help: consider further restricting type parameter `T` with trait `Clone`
    |
-LL -     Self::Baz: Clone,
-LL +     Self::Baz: Clone, T: std::clone::Clone
-   |
+LL |     Self::Baz: Clone, T: std::clone::Clone
+   |                     ~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 8 previous errors
 
diff --git a/tests/ui/associated-types/defaults-suitability.next.stderr b/tests/ui/associated-types/defaults-suitability.next.stderr
index b9ea541e981..61247cee1f3 100644
--- a/tests/ui/associated-types/defaults-suitability.next.stderr
+++ b/tests/ui/associated-types/defaults-suitability.next.stderr
@@ -134,9 +134,8 @@ LL |     type Baz = T;
    |          --- required by a bound in this associated type
 help: consider further restricting type parameter `T` with trait `Clone`
    |
-LL -     Self::Baz: Clone,
-LL +     Self::Baz: Clone, T: std::clone::Clone
-   |
+LL |     Self::Baz: Clone, T: std::clone::Clone
+   |                     ~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 8 previous errors
 
diff --git a/tests/ui/associated-types/issue-38821.stderr b/tests/ui/associated-types/issue-38821.stderr
index b29e9cc16e2..58f019704e7 100644
--- a/tests/ui/associated-types/issue-38821.stderr
+++ b/tests/ui/associated-types/issue-38821.stderr
@@ -13,9 +13,8 @@ LL | impl<T: NotNull> IntoNullable for T {
    |         unsatisfied trait bound introduced here
 help: consider extending the `where` clause, but there might be an alternative better way to express this requirement
    |
-LL -     Expr: Expression<SqlType=<Col::SqlType as IntoNullable>::Nullable>,
-LL +     Expr: Expression<SqlType=<Col::SqlType as IntoNullable>::Nullable>, <Col as Expression>::SqlType: NotNull
-   |
+LL |     Expr: Expression<SqlType=<Col::SqlType as IntoNullable>::Nullable>, <Col as Expression>::SqlType: NotNull
+   |                                                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not satisfied
   --> $DIR/issue-38821.rs:40:1
@@ -38,9 +37,8 @@ LL | impl<T: NotNull> IntoNullable for T {
    |         unsatisfied trait bound introduced here
 help: consider extending the `where` clause, but there might be an alternative better way to express this requirement
    |
-LL -     Expr: Expression<SqlType=<Col::SqlType as IntoNullable>::Nullable>,
-LL +     Expr: Expression<SqlType=<Col::SqlType as IntoNullable>::Nullable>, <Col as Expression>::SqlType: NotNull
-   |
+LL |     Expr: Expression<SqlType=<Col::SqlType as IntoNullable>::Nullable>, <Col as Expression>::SqlType: NotNull
+   |                                                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not satisfied
   --> $DIR/issue-38821.rs:23:10
diff --git a/tests/ui/associated-types/issue-54108.current.stderr b/tests/ui/associated-types/issue-54108.current.stderr
index 1b2285b214f..8850b4548e3 100644
--- a/tests/ui/associated-types/issue-54108.current.stderr
+++ b/tests/ui/associated-types/issue-54108.current.stderr
@@ -12,9 +12,8 @@ LL |     type Size: Add<Output = Self::Size>;
    |                ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Encoder::Size`
 help: consider further restricting the associated type
    |
-LL -     T: SubEncoder,
-LL +     T: SubEncoder, <T as SubEncoder>::ActualSize: Add
-   |
+LL |     T: SubEncoder, <T as SubEncoder>::ActualSize: Add
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/associated-types/issue-54108.next.stderr b/tests/ui/associated-types/issue-54108.next.stderr
index cc80ab63901..5e2fa551afe 100644
--- a/tests/ui/associated-types/issue-54108.next.stderr
+++ b/tests/ui/associated-types/issue-54108.next.stderr
@@ -12,9 +12,8 @@ LL |     type Size: Add<Output = Self::Size>;
    |                    ^^^^^^^^^^^^^^^^^^^ required by this bound in `Encoder::Size`
 help: consider further restricting the associated type
    |
-LL -     T: SubEncoder,
-LL +     T: SubEncoder, <T as SubEncoder>::ActualSize: Add
-   |
+LL |     T: SubEncoder, <T as SubEncoder>::ActualSize: Add
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/attributes/rustc_confusables.stderr b/tests/ui/attributes/rustc_confusables.stderr
index f475e9c494e..9ba1e327057 100644
--- a/tests/ui/attributes/rustc_confusables.stderr
+++ b/tests/ui/attributes/rustc_confusables.stderr
@@ -35,9 +35,8 @@ LL |     x.inser();
    |
 help: there is a method `insert` with a similar name
    |
-LL -     x.inser();
-LL +     x.insert();
-   |
+LL |     x.insert();
+   |       ~~~~~~
 
 error[E0599]: no method named `foo` found for struct `rustc_confusables_across_crate::BTreeSet` in the current scope
   --> $DIR/rustc_confusables.rs:15:7
diff --git a/tests/ui/attributes/rustc_confusables_std_cases.stderr b/tests/ui/attributes/rustc_confusables_std_cases.stderr
index b9acf2d31ab..7108887043b 100644
--- a/tests/ui/attributes/rustc_confusables_std_cases.stderr
+++ b/tests/ui/attributes/rustc_confusables_std_cases.stderr
@@ -38,9 +38,8 @@ LL |     let mut x = VecDeque::new();
    |         ----- earlier `x` shadowed here with type `VecDeque`
 help: you might have meant to use `push_back`
    |
-LL -     x.push(1);
-LL +     x.push_back(1);
-   |
+LL |     x.push_back(1);
+   |       ~~~~~~~~~
 
 error[E0599]: no method named `length` found for struct `Vec<{integer}>` in the current scope
   --> $DIR/rustc_confusables_std_cases.rs:15:7
@@ -98,9 +97,8 @@ note: method defined here
   --> $SRC_DIR/alloc/src/string.rs:LL:COL
 help: you might have meant to use `push_str`
    |
-LL -     String::new().push("");
-LL +     String::new().push_str("");
-   |
+LL |     String::new().push_str("");
+   |                   ~~~~~~~~
 
 error[E0599]: no method named `append` found for struct `String` in the current scope
   --> $DIR/rustc_confusables_std_cases.rs:24:19
diff --git a/tests/ui/borrowck/issue-115259-suggest-iter-mut.stderr b/tests/ui/borrowck/issue-115259-suggest-iter-mut.stderr
index 53b833e7c91..40ab2e61d6a 100644
--- a/tests/ui/borrowck/issue-115259-suggest-iter-mut.stderr
+++ b/tests/ui/borrowck/issue-115259-suggest-iter-mut.stderr
@@ -8,9 +8,8 @@ LL |         self.layers.iter().fold(0, |result, mut layer| result + layer.proce
    |
 help: you may want to use `iter_mut` here
    |
-LL -         self.layers.iter().fold(0, |result, mut layer| result + layer.process())
-LL +         self.layers.iter_mut().fold(0, |result, mut layer| result + layer.process())
-   |
+LL |         self.layers.iter_mut().fold(0, |result, mut layer| result + layer.process())
+   |                     ~~~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.stderr b/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.stderr
index 86d53012cf3..466f19eb0ab 100644
--- a/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.stderr
+++ b/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.stderr
@@ -8,9 +8,8 @@ LL |             vec.iter().flat_map(|container| container.things()).cloned().co
    |
 help: you may want to use `iter_mut` here
    |
-LL -             vec.iter().flat_map(|container| container.things()).cloned().collect::<Vec<PathBuf>>();
-LL +             vec.iter_mut().flat_map(|container| container.things()).cloned().collect::<Vec<PathBuf>>();
-   |
+LL |             vec.iter_mut().flat_map(|container| container.things()).cloned().collect::<Vec<PathBuf>>();
+   |                 ~~~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/borrowck/issue-62387-suggest-iter-mut.stderr b/tests/ui/borrowck/issue-62387-suggest-iter-mut.stderr
index f0a17d76a67..fd58e433020 100644
--- a/tests/ui/borrowck/issue-62387-suggest-iter-mut.stderr
+++ b/tests/ui/borrowck/issue-62387-suggest-iter-mut.stderr
@@ -8,9 +8,8 @@ LL |     v.iter().for_each(|a| a.double());
    |
 help: you may want to use `iter_mut` here
    |
-LL -     v.iter().for_each(|a| a.double());
-LL +     v.iter_mut().for_each(|a| a.double());
-   |
+LL |     v.iter_mut().for_each(|a| a.double());
+   |       ~~~~~~~~
 
 error[E0596]: cannot borrow `*a` as mutable, as it is behind a `&` reference
   --> $DIR/issue-62387-suggest-iter-mut.rs:25:39
@@ -22,9 +21,8 @@ LL |     v.iter().rev().rev().for_each(|a| a.double());
    |
 help: you may want to use `iter_mut` here
    |
-LL -     v.iter().rev().rev().for_each(|a| a.double());
-LL +     v.iter_mut().rev().rev().for_each(|a| a.double());
-   |
+LL |     v.iter_mut().rev().rev().for_each(|a| a.double());
+   |       ~~~~~~~~
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/c-variadic/issue-86053-1.stderr b/tests/ui/c-variadic/issue-86053-1.stderr
index 4ad3b73fd66..67a619e46d5 100644
--- a/tests/ui/c-variadic/issue-86053-1.stderr
+++ b/tests/ui/c-variadic/issue-86053-1.stderr
@@ -63,9 +63,8 @@ LL |     self , ... ,   self ,   self , ... ) where F : FnOnce ( & 'a & 'b usize
    |
 help: a trait with a similar name exists
    |
-LL -     self , ... ,   self ,   self , ... ) where F : FnOnce ( & 'a & 'b usize ) {
-LL +     self , ... ,   self ,   self , ... ) where Fn : FnOnce ( & 'a & 'b usize ) {
-   |
+LL |     self , ... ,   self ,   self , ... ) where Fn : FnOnce ( & 'a & 'b usize ) {
+   |                                                ~~
 help: you might be missing a type parameter
    |
 LL | fn ordering4 < 'a , 'b, F     > ( a :            ,   self , self ,   self ,
diff --git a/tests/ui/cfg/cfg-method-receiver.stderr b/tests/ui/cfg/cfg-method-receiver.stderr
index 639413b90fa..5767a7c1b4b 100644
--- a/tests/ui/cfg/cfg-method-receiver.stderr
+++ b/tests/ui/cfg/cfg-method-receiver.stderr
@@ -16,9 +16,8 @@ LL |     cbor_map! { #[cfg(test)] 4};
    = note: this error originates in the macro `cbor_map` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: you must specify a concrete type for this numeric value, like `i32`
    |
-LL -     cbor_map! { #[cfg(test)] 4};
-LL +     cbor_map! { #[cfg(test)] 4_i32};
-   |
+LL |     cbor_map! { #[cfg(test)] 4_i32};
+   |                              ~~~~~
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/check-cfg/diagnotics.cargo.stderr b/tests/ui/check-cfg/diagnotics.cargo.stderr
index ab7111eca24..a75a45b7d37 100644
--- a/tests/ui/check-cfg/diagnotics.cargo.stderr
+++ b/tests/ui/check-cfg/diagnotics.cargo.stderr
@@ -17,9 +17,8 @@ LL | #[cfg(featur = "foo")]
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
 help: there is a config with a similar name and value
    |
-LL - #[cfg(featur = "foo")]
-LL + #[cfg(feature = "foo")]
-   |
+LL | #[cfg(feature = "foo")]
+   |       ~~~~~~~
 
 warning: unexpected `cfg` condition name: `featur`
   --> $DIR/diagnotics.rs:17:7
diff --git a/tests/ui/check-cfg/diagnotics.rustc.stderr b/tests/ui/check-cfg/diagnotics.rustc.stderr
index 4aae1f00e70..df549b31364 100644
--- a/tests/ui/check-cfg/diagnotics.rustc.stderr
+++ b/tests/ui/check-cfg/diagnotics.rustc.stderr
@@ -19,9 +19,8 @@ LL | #[cfg(featur = "foo")]
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
 help: there is a config with a similar name and value
    |
-LL - #[cfg(featur = "foo")]
-LL + #[cfg(feature = "foo")]
-   |
+LL | #[cfg(feature = "foo")]
+   |       ~~~~~~~
 
 warning: unexpected `cfg` condition name: `featur`
   --> $DIR/diagnotics.rs:17:7
diff --git a/tests/ui/closures/2229_closure_analysis/bad-pattern.stderr b/tests/ui/closures/2229_closure_analysis/bad-pattern.stderr
index f5cbecc5704..b5ad8eb790f 100644
--- a/tests/ui/closures/2229_closure_analysis/bad-pattern.stderr
+++ b/tests/ui/closures/2229_closure_analysis/bad-pattern.stderr
@@ -108,9 +108,8 @@ LL |         let PAT = v1;
    = note: the matched value is of type `u32`
 help: introduce a variable instead
    |
-LL -         let PAT = v1;
-LL +         let PAT_var = v1;
-   |
+LL |         let PAT_var = v1;
+   |             ~~~~~~~
 
 error: aborting due to 7 previous errors
 
diff --git a/tests/ui/closures/issue-78720.stderr b/tests/ui/closures/issue-78720.stderr
index acce1dc191a..5d65c87b0fd 100644
--- a/tests/ui/closures/issue-78720.stderr
+++ b/tests/ui/closures/issue-78720.stderr
@@ -15,9 +15,8 @@ LL |     _func: F,
    |
 help: a trait with a similar name exists
    |
-LL -     _func: F,
-LL +     _func: Fn,
-   |
+LL |     _func: Fn,
+   |            ~~
 help: you might be missing a type parameter
    |
 LL | struct Map2<Segment2, F> {
diff --git a/tests/ui/compare-method/bad-self-type.stderr b/tests/ui/compare-method/bad-self-type.stderr
index f662b5a11cb..0a05b0a83af 100644
--- a/tests/ui/compare-method/bad-self-type.stderr
+++ b/tests/ui/compare-method/bad-self-type.stderr
@@ -8,9 +8,8 @@ LL |     fn poll(self, _: &mut Context<'_>) -> Poll<()> {
               found signature `fn(MyFuture, &mut Context<'_>) -> Poll<_>`
 help: change the self-receiver type to match the trait
    |
-LL -     fn poll(self, _: &mut Context<'_>) -> Poll<()> {
-LL +     fn poll(self: Pin<&mut MyFuture>, _: &mut Context<'_>) -> Poll<()> {
-   |
+LL |     fn poll(self: Pin<&mut MyFuture>, _: &mut Context<'_>) -> Poll<()> {
+   |             ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0053]: method `foo` has an incompatible type for trait
   --> $DIR/bad-self-type.rs:22:18
diff --git a/tests/ui/const-generics/ensure_is_evaluatable.stderr b/tests/ui/const-generics/ensure_is_evaluatable.stderr
index 397902846ec..62f8bc34f2e 100644
--- a/tests/ui/const-generics/ensure_is_evaluatable.stderr
+++ b/tests/ui/const-generics/ensure_is_evaluatable.stderr
@@ -14,9 +14,8 @@ LL |     [(); N + 1]:,
    |          ^^^^^ required by this bound in `bar`
 help: try adding a `where` bound
    |
-LL -     [(); M + 1]:,
-LL +     [(); M + 1]:, [(); N + 1]:
-   |
+LL |     [(); M + 1]:, [(); N + 1]:
+   |                 ~~~~~~~~~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/const-generics/fn_with_two_const_inputs.stderr b/tests/ui/const-generics/fn_with_two_const_inputs.stderr
index 147a2c91fd0..c0a913a21fd 100644
--- a/tests/ui/const-generics/fn_with_two_const_inputs.stderr
+++ b/tests/ui/const-generics/fn_with_two_const_inputs.stderr
@@ -14,9 +14,8 @@ LL |     [(); N + 1]:,
    |          ^^^^^ required by this bound in `bar`
 help: try adding a `where` bound
    |
-LL -     [(); both(N + 1, M + 1)]:,
-LL +     [(); both(N + 1, M + 1)]:, [(); N + 1]:
-   |
+LL |     [(); both(N + 1, M + 1)]:, [(); N + 1]:
+   |                              ~~~~~~~~~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-3.stderr b/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-3.stderr
index 9cb71ad8a09..3622ef16a96 100644
--- a/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-3.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-3.stderr
@@ -16,9 +16,8 @@ LL |     fn assert_impl<T: Trait>() {}
    |                       ^^^^^ required by this bound in `assert_impl`
 help: try adding a `where` bound
    |
-LL -     EvaluatableU128<{N as u128}>:, {
-LL +     EvaluatableU128<{N as u128}>:, [(); { O as u128 } as usize]: {
-   |
+LL |     EvaluatableU128<{N as u128}>:, [(); { O as u128 } as usize]: {
+   |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/abstract-const-as-cast-3.rs:17:5
@@ -52,9 +51,8 @@ LL |     fn assert_impl<T: Trait>() {}
    |                       ^^^^^ required by this bound in `assert_impl`
 help: try adding a `where` bound
    |
-LL -     EvaluatableU128<{N as u128}>:, {
-LL +     EvaluatableU128<{N as u128}>:, [(); { O as u128 } as usize]: {
-   |
+LL |     EvaluatableU128<{N as u128}>:, [(); { O as u128 } as usize]: {
+   |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/abstract-const-as-cast-3.rs:20:5
@@ -116,9 +114,8 @@ LL |     fn assert_impl<T: Trait>() {}
    |                       ^^^^^ required by this bound in `assert_impl`
 help: try adding a `where` bound
    |
-LL -     EvaluatableU128<{N as _}>:, {
-LL +     EvaluatableU128<{N as _}>:, [(); { O as u128 } as usize]: {
-   |
+LL |     EvaluatableU128<{N as _}>:, [(); { O as u128 } as usize]: {
+   |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/abstract-const-as-cast-3.rs:35:5
@@ -152,9 +149,8 @@ LL |     fn assert_impl<T: Trait>() {}
    |                       ^^^^^ required by this bound in `assert_impl`
 help: try adding a `where` bound
    |
-LL -     EvaluatableU128<{N as _}>:, {
-LL +     EvaluatableU128<{N as _}>:, [(); { O as u128 } as usize]: {
-   |
+LL |     EvaluatableU128<{N as _}>:, [(); { O as u128 } as usize]: {
+   |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/abstract-const-as-cast-3.rs:38:5
diff --git a/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/doesnt_unify_evaluatable.stderr b/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/doesnt_unify_evaluatable.stderr
index b43ce5eca43..f3a38fcc005 100644
--- a/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/doesnt_unify_evaluatable.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/doesnt_unify_evaluatable.stderr
@@ -6,9 +6,8 @@ LL |     bar::<{ T::ASSOC }>();
    |
 help: try adding a `where` bound
    |
-LL - fn foo<T: Trait, U: Trait>() where [(); U::ASSOC]:, {
-LL + fn foo<T: Trait, U: Trait>() where [(); U::ASSOC]:, [(); { T::ASSOC }]: {
-   |
+LL | fn foo<T: Trait, U: Trait>() where [(); U::ASSOC]:, [(); { T::ASSOC }]: {
+   |                                                   ~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.stderr b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.stderr
index 86e35e17a07..4d1fb02b59e 100644
--- a/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.stderr
@@ -26,9 +26,8 @@ LL |     foo::<_, L>([(); L + 1 + L]);
    |
 help: try adding a `where` bound
    |
-LL -     [(); (L - 1) + 1 + L]:,
-LL +     [(); (L - 1) + 1 + L]:, [(); L + 1 + L]:
-   |
+LL |     [(); (L - 1) + 1 + L]:, [(); L + 1 + L]:
+   |                           ~~~~~~~~~~~~~~~~~~
 
 error: unconstrained generic constant
   --> $DIR/issue_114151.rs:17:17
diff --git a/tests/ui/const-generics/generic_const_exprs/const_kind_expr/wf_obligation.stderr b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/wf_obligation.stderr
index c63a79e64ed..99eab935a09 100644
--- a/tests/ui/const-generics/generic_const_exprs/const_kind_expr/wf_obligation.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/wf_obligation.stderr
@@ -15,9 +15,8 @@ LL |     foo::<_, L>([(); L + 1 + L]);
    |
 help: try adding a `where` bound
    |
-LL -     [(); (L - 1) + 1 + L]:,
-LL +     [(); (L - 1) + 1 + L]:, [(); L + 1 + L]:
-   |
+LL |     [(); (L - 1) + 1 + L]:, [(); L + 1 + L]:
+   |                           ~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr b/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr
index c63beeac367..86fbca58505 100644
--- a/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr
@@ -9,9 +9,8 @@ LL |          let f: F = async { 1 };
    |
 help: a trait with a similar name exists
    |
-LL -          let f: F = async { 1 };
-LL +          let f: Fn = async { 1 };
-   |
+LL |          let f: Fn = async { 1 };
+   |                 ~~
 help: you might be missing a type parameter
    |
 LL | fn f<T, F>(
diff --git a/tests/ui/consts/const-pattern-irrefutable.stderr b/tests/ui/consts/const-pattern-irrefutable.stderr
index a97e35e385f..4fa8caa57ce 100644
--- a/tests/ui/consts/const-pattern-irrefutable.stderr
+++ b/tests/ui/consts/const-pattern-irrefutable.stderr
@@ -12,9 +12,8 @@ LL |     let a = 4;
    = note: the matched value is of type `u8`
 help: introduce a variable instead
    |
-LL -     let a = 4;
-LL +     let a_var = 4;
-   |
+LL |     let a_var = 4;
+   |         ~~~~~
 
 error[E0005]: refutable pattern in local binding
   --> $DIR/const-pattern-irrefutable.rs:28:9
@@ -48,9 +47,8 @@ LL |     let d = (4, 4);
    = note: the matched value is of type `(u8, u8)`
 help: introduce a variable instead
    |
-LL -     let d = (4, 4);
-LL +     let d_var = (4, 4);
-   |
+LL |     let d_var = (4, 4);
+   |         ~~~~~
 
 error[E0005]: refutable pattern in local binding
   --> $DIR/const-pattern-irrefutable.rs:36:9
@@ -71,9 +69,8 @@ LL | struct S {
    = note: the matched value is of type `S`
 help: introduce a variable instead
    |
-LL -     let e = S {
-LL +     let e_var = S {
-   |
+LL |     let e_var = S {
+   |         ~~~~~
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/did_you_mean/dont-suggest-hygienic-fields.stderr b/tests/ui/did_you_mean/dont-suggest-hygienic-fields.stderr
index 72b65006a3f..473c9a339fc 100644
--- a/tests/ui/did_you_mean/dont-suggest-hygienic-fields.stderr
+++ b/tests/ui/did_you_mean/dont-suggest-hygienic-fields.stderr
@@ -10,9 +10,8 @@ LL |     const CRATE: Crate = Crate { fiel: () };
    = note: this error originates in the macro `environment` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: a field with a similar name exists
    |
-LL -     const CRATE: Crate = Crate { fiel: () };
-LL +     const CRATE: Crate = Crate { field: () };
-   |
+LL |     const CRATE: Crate = Crate { field: () };
+   |                                  ~~~~~
 
 error[E0609]: no field `field` on type `Compound`
   --> $DIR/dont-suggest-hygienic-fields.rs:24:16
diff --git a/tests/ui/dropck/explicit-drop-bounds.bad1.stderr b/tests/ui/dropck/explicit-drop-bounds.bad1.stderr
index 650244ac02a..2caa779ffab 100644
--- a/tests/ui/dropck/explicit-drop-bounds.bad1.stderr
+++ b/tests/ui/dropck/explicit-drop-bounds.bad1.stderr
@@ -11,9 +11,8 @@ LL | struct DropMe<T: Copy>(T);
    |                  ^^^^ required by this bound in `DropMe`
 help: consider further restricting type parameter `T` with trait `Copy`
    |
-LL -     [T; 1]: Copy, // But `[T; 1]: Copy` does not imply `T: Copy`
-LL +     [T; 1]: Copy, T: std::marker::Copy // But `[T; 1]: Copy` does not imply `T: Copy`
-   |
+LL |     [T; 1]: Copy, T: std::marker::Copy // But `[T; 1]: Copy` does not imply `T: Copy`
+   |                 ~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0277]: the trait bound `T: Copy` is not satisfied
   --> $DIR/explicit-drop-bounds.rs:32:18
@@ -28,9 +27,8 @@ LL | struct DropMe<T: Copy>(T);
    |                  ^^^^ required by this bound in `DropMe`
 help: consider further restricting type parameter `T` with trait `Copy`
    |
-LL -     [T; 1]: Copy, // But `[T; 1]: Copy` does not imply `T: Copy`
-LL +     [T; 1]: Copy, T: std::marker::Copy // But `[T; 1]: Copy` does not imply `T: Copy`
-   |
+LL |     [T; 1]: Copy, T: std::marker::Copy // But `[T; 1]: Copy` does not imply `T: Copy`
+   |                 ~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/dst/issue-90528-unsizing-suggestion-3.stderr b/tests/ui/dst/issue-90528-unsizing-suggestion-3.stderr
index c54cc858129..774d5ba3c89 100644
--- a/tests/ui/dst/issue-90528-unsizing-suggestion-3.stderr
+++ b/tests/ui/dst/issue-90528-unsizing-suggestion-3.stderr
@@ -67,9 +67,8 @@ LL | fn wants_write(_: impl Write) {}
    |                        ^^^^^ required by this bound in `wants_write`
 help: consider changing this borrow's mutability
    |
-LL -     wants_write(&[0u8][..]);
-LL +     wants_write(&mut [0u8][..]);
-   |
+LL |     wants_write(&mut [0u8][..]);
+   |                 ~~~~
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/empty/empty-struct-braces-expr.stderr b/tests/ui/empty/empty-struct-braces-expr.stderr
index 3411702a12d..140b6e009b7 100644
--- a/tests/ui/empty/empty-struct-braces-expr.stderr
+++ b/tests/ui/empty/empty-struct-braces-expr.stderr
@@ -14,9 +14,8 @@ LL | pub struct XEmpty2;
    |
 help: use struct literal syntax instead
    |
-LL -     let e1 = Empty1;
-LL +     let e1 = Empty1 {};
-   |
+LL |     let e1 = Empty1 {};
+   |              ~~~~~~~~~
 help: a unit struct with a similar name exists
    |
 LL -     let e1 = Empty1;
@@ -38,9 +37,8 @@ LL | pub struct XEmpty2;
    |
 help: use struct literal syntax instead
    |
-LL -     let xe1 = XEmpty1;
-LL +     let xe1 = XEmpty1 {};
-   |
+LL |     let xe1 = XEmpty1 {};
+   |               ~~~~~~~~~~
 help: a unit struct with a similar name exists
    |
 LL -     let xe1 = XEmpty1;
diff --git a/tests/ui/empty/empty-struct-tuple-pat.stderr b/tests/ui/empty/empty-struct-tuple-pat.stderr
index 3906a0e2060..19e44bacaa0 100644
--- a/tests/ui/empty/empty-struct-tuple-pat.stderr
+++ b/tests/ui/empty/empty-struct-tuple-pat.stderr
@@ -46,9 +46,8 @@ LL |     XEmpty5(),
    |
 help: use the tuple variant pattern syntax instead
    |
-LL -         XE::XEmpty5 => (),
-LL +         XE::XEmpty5() => (),
-   |
+LL |         XE::XEmpty5() => (),
+   |         ~~~~~~~~~~~~~
 help: a unit variant with a similar name exists
    |
 LL -         XE::XEmpty5 => (),
diff --git a/tests/ui/extern/not-in-block.stderr b/tests/ui/extern/not-in-block.stderr
index f35d98e9948..cd1cd0fa50e 100644
--- a/tests/ui/extern/not-in-block.stderr
+++ b/tests/ui/extern/not-in-block.stderr
@@ -11,9 +11,8 @@ LL + extern fn none_fn(x: bool) -> i32 { <body> }
    |
 help: if you meant to declare an externally defined function, use an `extern` block
    |
-LL - extern fn none_fn(x: bool) -> i32;
-LL + extern { fn none_fn(x: bool) -> i32; }
-   |
+LL | extern { fn none_fn(x: bool) -> i32; }
+   | ~~~~~~~~                             +
 
 error: free function without a body
   --> $DIR/not-in-block.rs:6:1
@@ -28,9 +27,8 @@ LL + extern "C" fn c_fn(x: bool) -> i32 { <body> }
    |
 help: if you meant to declare an externally defined function, use an `extern` block
    |
-LL - extern "C" fn c_fn(x: bool) -> i32;
-LL + extern "C" { fn c_fn(x: bool) -> i32; }
-   |
+LL | extern "C" { fn c_fn(x: bool) -> i32; }
+   | ~~~~~~~~~~~~                          +
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/fmt/no-inline-literals-out-of-range.stderr b/tests/ui/fmt/no-inline-literals-out-of-range.stderr
index 78047eabf49..25486b85472 100644
--- a/tests/ui/fmt/no-inline-literals-out-of-range.stderr
+++ b/tests/ui/fmt/no-inline-literals-out-of-range.stderr
@@ -51,9 +51,8 @@ LL |     format_args!("{}", 0xffff_ffff); // treat unsuffixed literals as i32
    = help: consider using the type `u32` instead
 help: to use as a negative number (decimal `-1`), consider using the type `u32` for the literal and cast it to `i32`
    |
-LL -     format_args!("{}", 0xffff_ffff); // treat unsuffixed literals as i32
-LL +     format_args!("{}", 0xffff_ffffu32 as i32); // treat unsuffixed literals as i32
-   |
+LL |     format_args!("{}", 0xffff_ffffu32 as i32); // treat unsuffixed literals as i32
+   |                        ~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 5 previous errors
 
diff --git a/tests/ui/impl-trait/no-method-suggested-traits.stderr b/tests/ui/impl-trait/no-method-suggested-traits.stderr
index af6d492c74d..676247d1a42 100644
--- a/tests/ui/impl-trait/no-method-suggested-traits.stderr
+++ b/tests/ui/impl-trait/no-method-suggested-traits.stderr
@@ -17,9 +17,8 @@ LL + use no_method_suggested_traits::qux::PrivPub;
    |
 help: there is a method `method2` with a similar name
    |
-LL -     1u32.method();
-LL +     1u32.method2();
-   |
+LL |     1u32.method2();
+   |          ~~~~~~~
 
 error[E0599]: no method named `method` found for struct `Rc<&mut Box<&u32>>` in the current scope
   --> $DIR/no-method-suggested-traits.rs:26:44
@@ -40,9 +39,8 @@ LL + use no_method_suggested_traits::qux::PrivPub;
    |
 help: there is a method `method2` with a similar name
    |
-LL -     std::rc::Rc::new(&mut Box::new(&1u32)).method();
-LL +     std::rc::Rc::new(&mut Box::new(&1u32)).method2();
-   |
+LL |     std::rc::Rc::new(&mut Box::new(&1u32)).method2();
+   |                                            ~~~~~~~
 
 error[E0599]: no method named `method` found for type `char` in the current scope
   --> $DIR/no-method-suggested-traits.rs:30:9
@@ -60,9 +58,8 @@ LL + use foo::Bar;
    |
 help: there is a method `method2` with a similar name
    |
-LL -     'a'.method();
-LL +     'a'.method2();
-   |
+LL |     'a'.method2();
+   |         ~~~~~~~
 
 error[E0599]: no method named `method` found for struct `Rc<&mut Box<&char>>` in the current scope
   --> $DIR/no-method-suggested-traits.rs:32:43
@@ -77,9 +74,8 @@ LL + use foo::Bar;
    |
 help: there is a method `method2` with a similar name
    |
-LL -     std::rc::Rc::new(&mut Box::new(&'a')).method();
-LL +     std::rc::Rc::new(&mut Box::new(&'a')).method2();
-   |
+LL |     std::rc::Rc::new(&mut Box::new(&'a')).method2();
+   |                                           ~~~~~~~
 
 error[E0599]: no method named `method` found for type `i32` in the current scope
   --> $DIR/no-method-suggested-traits.rs:35:10
@@ -99,9 +95,8 @@ LL + use no_method_suggested_traits::foo::PubPub;
    |
 help: there is a method `method3` with a similar name
    |
-LL -     1i32.method();
-LL +     1i32.method3();
-   |
+LL |     1i32.method3();
+   |          ~~~~~~~
 
 error[E0599]: no method named `method` found for struct `Rc<&mut Box<&i32>>` in the current scope
   --> $DIR/no-method-suggested-traits.rs:37:44
@@ -116,9 +111,8 @@ LL + use no_method_suggested_traits::foo::PubPub;
    |
 help: there is a method `method3` with a similar name
    |
-LL -     std::rc::Rc::new(&mut Box::new(&1i32)).method();
-LL +     std::rc::Rc::new(&mut Box::new(&1i32)).method3();
-   |
+LL |     std::rc::Rc::new(&mut Box::new(&1i32)).method3();
+   |                                            ~~~~~~~
 
 error[E0599]: no method named `method` found for struct `Foo` in the current scope
   --> $DIR/no-method-suggested-traits.rs:40:9
diff --git a/tests/ui/imports/glob-resolve1.stderr b/tests/ui/imports/glob-resolve1.stderr
index 6a48e36d378..4401ef58732 100644
--- a/tests/ui/imports/glob-resolve1.stderr
+++ b/tests/ui/imports/glob-resolve1.stderr
@@ -37,9 +37,8 @@ LL | |     }
    | |_____^
 help: you might have meant to use the following enum variant
    |
-LL -     B;
-LL +     B::B1;
-   |
+LL |     B::B1;
+   |     ~~~~~
 
 error[E0425]: cannot find value `C` in this scope
   --> $DIR/glob-resolve1.rs:29:5
diff --git a/tests/ui/imports/issue-45829/import-self.stderr b/tests/ui/imports/issue-45829/import-self.stderr
index 62bc559b778..f15beac5e16 100644
--- a/tests/ui/imports/issue-45829/import-self.stderr
+++ b/tests/ui/imports/issue-45829/import-self.stderr
@@ -32,9 +32,8 @@ LL | use foo::{self};
    = note: `foo` must be defined only once in the type namespace of this module
 help: you can use `as` to change the binding name of the import
    |
-LL - use foo::{self};
-LL + use foo::{self as other_foo};
-   |
+LL | use foo::{self as other_foo};
+   |           ~~~~~~~~~~~~~~~~~
 
 error[E0255]: the name `foo` is defined multiple times
   --> $DIR/import-self.rs:12:5
diff --git a/tests/ui/issues/issue-32004.stderr b/tests/ui/issues/issue-32004.stderr
index 88395cd8520..6fa548015fa 100644
--- a/tests/ui/issues/issue-32004.stderr
+++ b/tests/ui/issues/issue-32004.stderr
@@ -11,9 +11,8 @@ LL |         Foo::Bar => {}
    |
 help: use the tuple variant pattern syntax instead
    |
-LL -         Foo::Bar => {}
-LL +         Foo::Bar(_) => {}
-   |
+LL |         Foo::Bar(_) => {}
+   |         ~~~~~~~~~~~
 help: a unit variant with a similar name exists
    |
 LL -         Foo::Bar => {}
diff --git a/tests/ui/issues/issue-41652/issue-41652.stderr b/tests/ui/issues/issue-41652/issue-41652.stderr
index c8299f28d34..a5a2fab2ede 100644
--- a/tests/ui/issues/issue-41652/issue-41652.stderr
+++ b/tests/ui/issues/issue-41652/issue-41652.stderr
@@ -6,9 +6,8 @@ LL |         3.f()
    |
 help: you must specify a concrete type for this numeric value, like `i32`
    |
-LL -         3.f()
-LL +         3_i32.f()
-   |
+LL |         3_i32.f()
+   |         ~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/issues/issue-51874.stderr b/tests/ui/issues/issue-51874.stderr
index 18328450145..5be3695dd45 100644
--- a/tests/ui/issues/issue-51874.stderr
+++ b/tests/ui/issues/issue-51874.stderr
@@ -6,9 +6,8 @@ LL |     let a = (1.0).pow(1.0);
    |
 help: you must specify a concrete type for this numeric value, like `f32`
    |
-LL -     let a = (1.0).pow(1.0);
-LL +     let a = (1.0_f32).pow(1.0);
-   |
+LL |     let a = (1.0_f32).pow(1.0);
+   |              ~~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/issues/issue-5358-1.stderr b/tests/ui/issues/issue-5358-1.stderr
index f598cf33911..1bb946ce4cb 100644
--- a/tests/ui/issues/issue-5358-1.stderr
+++ b/tests/ui/issues/issue-5358-1.stderr
@@ -14,9 +14,8 @@ LL |         S(Either::Right(_)) => {}
    |         ++                +
 help: you might have meant to use field `0` whose type is `Either<usize, usize>`
    |
-LL -     match S(Either::Left(5)) {
-LL +     match S(Either::Left(5)).0 {
-   |
+LL |     match S(Either::Left(5)).0 {
+   |           ~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/issues/issue-56175.stderr b/tests/ui/issues/issue-56175.stderr
index 695aa2ac796..50c26b83dd3 100644
--- a/tests/ui/issues/issue-56175.stderr
+++ b/tests/ui/issues/issue-56175.stderr
@@ -16,9 +16,8 @@ LL + use reexported_trait::Trait;
    |
 help: there is a method `trait_method_b` with a similar name
    |
-LL -     reexported_trait::FooStruct.trait_method();
-LL +     reexported_trait::FooStruct.trait_method_b();
-   |
+LL |     reexported_trait::FooStruct.trait_method_b();
+   |                                 ~~~~~~~~~~~~~~
 
 error[E0599]: no method named `trait_method_b` found for struct `FooStruct` in the current scope
   --> $DIR/issue-56175.rs:7:33
diff --git a/tests/ui/lint/let_underscore/issue-119696-err-on-fn.stderr b/tests/ui/lint/let_underscore/issue-119696-err-on-fn.stderr
index a244d7604d7..59f473b14d8 100644
--- a/tests/ui/lint/let_underscore/issue-119696-err-on-fn.stderr
+++ b/tests/ui/lint/let_underscore/issue-119696-err-on-fn.stderr
@@ -11,9 +11,8 @@ LL | #![deny(let_underscore_drop)]
    |         ^^^^^^^^^^^^^^^^^^^
 help: consider binding to an unused variable to avoid immediately dropping the value
    |
-LL -     let _ = foo();
-LL +     let _unused = foo();
-   |
+LL |     let _unused = foo();
+   |         ~~~~~~~
 help: consider immediately dropping the value
    |
 LL -     let _ = foo();
diff --git a/tests/ui/lint/let_underscore/issue-119697-extra-let.stderr b/tests/ui/lint/let_underscore/issue-119697-extra-let.stderr
index 8773d5df443..3cef341ddb0 100644
--- a/tests/ui/lint/let_underscore/issue-119697-extra-let.stderr
+++ b/tests/ui/lint/let_underscore/issue-119697-extra-let.stderr
@@ -28,9 +28,8 @@ LL |     let _ = field;
    |
 help: consider binding to an unused variable to avoid immediately dropping the value
    |
-LL -     let _ = field;
-LL +     let _unused = field;
-   |
+LL |     let _unused = field;
+   |         ~~~~~~~
 help: consider immediately dropping the value
    |
 LL -     let _ = field;
diff --git a/tests/ui/lint/let_underscore/let_underscore_drop.stderr b/tests/ui/lint/let_underscore/let_underscore_drop.stderr
index c7984d629da..a326cd4fec4 100644
--- a/tests/ui/lint/let_underscore/let_underscore_drop.stderr
+++ b/tests/ui/lint/let_underscore/let_underscore_drop.stderr
@@ -11,9 +11,8 @@ LL | #![warn(let_underscore_drop)]
    |         ^^^^^^^^^^^^^^^^^^^
 help: consider binding to an unused variable to avoid immediately dropping the value
    |
-LL -     let _ = NontrivialDrop;
-LL +     let _unused = NontrivialDrop;
-   |
+LL |     let _unused = NontrivialDrop;
+   |         ~~~~~~~
 help: consider immediately dropping the value
    |
 LL -     let _ = NontrivialDrop;
diff --git a/tests/ui/lint/let_underscore/let_underscore_lock.stderr b/tests/ui/lint/let_underscore/let_underscore_lock.stderr
index 60d5ed649f5..90f661d379e 100644
--- a/tests/ui/lint/let_underscore/let_underscore_lock.stderr
+++ b/tests/ui/lint/let_underscore/let_underscore_lock.stderr
@@ -7,9 +7,8 @@ LL |     let _ = data.lock().unwrap();
    = note: `#[deny(let_underscore_lock)]` on by default
 help: consider binding to an unused variable to avoid immediately dropping the value
    |
-LL -     let _ = data.lock().unwrap();
-LL +     let _unused = data.lock().unwrap();
-   |
+LL |     let _unused = data.lock().unwrap();
+   |         ~~~~~~~
 help: consider immediately dropping the value
    |
 LL -     let _ = data.lock().unwrap();
@@ -24,9 +23,8 @@ LL |     let _ = data.lock();
    |
 help: consider binding to an unused variable to avoid immediately dropping the value
    |
-LL -     let _ = data.lock();
-LL +     let _unused = data.lock();
-   |
+LL |     let _unused = data.lock();
+   |         ~~~~~~~
 help: consider immediately dropping the value
    |
 LL -     let _ = data.lock();
@@ -42,9 +40,8 @@ LL |     let (_, _) = (data.lock(), 1);
    = help: consider immediately dropping the value using `drop(..)` after the `let` statement
 help: consider binding to an unused variable to avoid immediately dropping the value
    |
-LL -     let (_, _) = (data.lock(), 1);
-LL +     let (_unused, _) = (data.lock(), 1);
-   |
+LL |     let (_unused, _) = (data.lock(), 1);
+   |          ~~~~~~~
 
 error: non-binding let on a synchronization lock
   --> $DIR/let_underscore_lock.rs:16:26
@@ -55,9 +52,8 @@ LL |     let (_a, Struct { a: _ }) = (0, Struct { a: data.lock() });
    = help: consider immediately dropping the value using `drop(..)` after the `let` statement
 help: consider binding to an unused variable to avoid immediately dropping the value
    |
-LL -     let (_a, Struct { a: _ }) = (0, Struct { a: data.lock() });
-LL +     let (_a, Struct { a: _unused }) = (0, Struct { a: data.lock() });
-   |
+LL |     let (_a, Struct { a: _unused }) = (0, Struct { a: data.lock() });
+   |                          ~~~~~~~
 
 error: non-binding let on a synchronization lock
   --> $DIR/let_underscore_lock.rs:18:6
diff --git a/tests/ui/lint/static-mut-refs.e2021.stderr b/tests/ui/lint/static-mut-refs.e2021.stderr
index abd579b336f..39a4056dd7f 100644
--- a/tests/ui/lint/static-mut-refs.e2021.stderr
+++ b/tests/ui/lint/static-mut-refs.e2021.stderr
@@ -9,9 +9,8 @@ LL |         let _y = &X;
    = note: `#[warn(static_mut_refs)]` on by default
 help: use `&raw const` instead to create a raw pointer
    |
-LL -         let _y = &X;
-LL +         let _y = &raw const X;
-   |
+LL |         let _y = &raw const X;
+   |                  ~~~~~~~~~~
 
 warning: creating a mutable reference to mutable static is discouraged
   --> $DIR/static-mut-refs.rs:42:18
@@ -46,9 +45,8 @@ LL |         let (_b, _c) = (&X, &Y);
    = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
 help: use `&raw const` instead to create a raw pointer
    |
-LL -         let (_b, _c) = (&X, &Y);
-LL +         let (_b, _c) = (&raw const X, &Y);
-   |
+LL |         let (_b, _c) = (&raw const X, &Y);
+   |                         ~~~~~~~~~~
 
 warning: creating a shared reference to mutable static is discouraged
   --> $DIR/static-mut-refs.rs:54:29
@@ -60,9 +58,8 @@ LL |         let (_b, _c) = (&X, &Y);
    = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
 help: use `&raw const` instead to create a raw pointer
    |
-LL -         let (_b, _c) = (&X, &Y);
-LL +         let (_b, _c) = (&X, &raw const Y);
-   |
+LL |         let (_b, _c) = (&X, &raw const Y);
+   |                             ~~~~~~~~~~
 
 warning: creating a shared reference to mutable static is discouraged
   --> $DIR/static-mut-refs.rs:60:13
@@ -74,9 +71,8 @@ LL |         foo(&X);
    = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
 help: use `&raw const` instead to create a raw pointer
    |
-LL -         foo(&X);
-LL +         foo(&raw const X);
-   |
+LL |         foo(&raw const X);
+   |             ~~~~~~~~~~
 
 warning: creating a shared reference to mutable static is discouraged
   --> $DIR/static-mut-refs.rs:66:17
@@ -106,9 +102,8 @@ LL |         let _v = &A.value;
    = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
 help: use `&raw const` instead to create a raw pointer
    |
-LL -         let _v = &A.value;
-LL +         let _v = &raw const A.value;
-   |
+LL |         let _v = &raw const A.value;
+   |                  ~~~~~~~~~~
 
 warning: creating a shared reference to mutable static is discouraged
   --> $DIR/static-mut-refs.rs:80:18
@@ -120,9 +115,8 @@ LL |         let _s = &A.s.value;
    = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
 help: use `&raw const` instead to create a raw pointer
    |
-LL -         let _s = &A.s.value;
-LL +         let _s = &raw const A.s.value;
-   |
+LL |         let _s = &raw const A.s.value;
+   |                  ~~~~~~~~~~
 
 warning: creating a shared reference to mutable static is discouraged
   --> $DIR/static-mut-refs.rs:84:22
diff --git a/tests/ui/lint/static-mut-refs.e2024.stderr b/tests/ui/lint/static-mut-refs.e2024.stderr
index 1387cdf0b32..51eaf2785d1 100644
--- a/tests/ui/lint/static-mut-refs.e2024.stderr
+++ b/tests/ui/lint/static-mut-refs.e2024.stderr
@@ -9,9 +9,8 @@ LL |         let _y = &X;
    = note: `#[deny(static_mut_refs)]` on by default
 help: use `&raw const` instead to create a raw pointer
    |
-LL -         let _y = &X;
-LL +         let _y = &raw const X;
-   |
+LL |         let _y = &raw const X;
+   |                  ~~~~~~~~~~
 
 error: creating a mutable reference to mutable static is discouraged
   --> $DIR/static-mut-refs.rs:42:18
@@ -46,9 +45,8 @@ LL |         let (_b, _c) = (&X, &Y);
    = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
 help: use `&raw const` instead to create a raw pointer
    |
-LL -         let (_b, _c) = (&X, &Y);
-LL +         let (_b, _c) = (&raw const X, &Y);
-   |
+LL |         let (_b, _c) = (&raw const X, &Y);
+   |                         ~~~~~~~~~~
 
 error: creating a shared reference to mutable static is discouraged
   --> $DIR/static-mut-refs.rs:54:29
@@ -60,9 +58,8 @@ LL |         let (_b, _c) = (&X, &Y);
    = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
 help: use `&raw const` instead to create a raw pointer
    |
-LL -         let (_b, _c) = (&X, &Y);
-LL +         let (_b, _c) = (&X, &raw const Y);
-   |
+LL |         let (_b, _c) = (&X, &raw const Y);
+   |                             ~~~~~~~~~~
 
 error: creating a shared reference to mutable static is discouraged
   --> $DIR/static-mut-refs.rs:60:13
@@ -74,9 +71,8 @@ LL |         foo(&X);
    = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
 help: use `&raw const` instead to create a raw pointer
    |
-LL -         foo(&X);
-LL +         foo(&raw const X);
-   |
+LL |         foo(&raw const X);
+   |             ~~~~~~~~~~
 
 error: creating a shared reference to mutable static is discouraged
   --> $DIR/static-mut-refs.rs:66:17
@@ -106,9 +102,8 @@ LL |         let _v = &A.value;
    = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
 help: use `&raw const` instead to create a raw pointer
    |
-LL -         let _v = &A.value;
-LL +         let _v = &raw const A.value;
-   |
+LL |         let _v = &raw const A.value;
+   |                  ~~~~~~~~~~
 
 error: creating a shared reference to mutable static is discouraged
   --> $DIR/static-mut-refs.rs:80:18
@@ -120,9 +115,8 @@ LL |         let _s = &A.s.value;
    = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
 help: use `&raw const` instead to create a raw pointer
    |
-LL -         let _s = &A.s.value;
-LL +         let _s = &raw const A.s.value;
-   |
+LL |         let _s = &raw const A.s.value;
+   |                  ~~~~~~~~~~
 
 error: creating a shared reference to mutable static is discouraged
   --> $DIR/static-mut-refs.rs:84:22
diff --git a/tests/ui/lint/type-overflow.stderr b/tests/ui/lint/type-overflow.stderr
index 0ac67fddaa7..4e68e7ee80f 100644
--- a/tests/ui/lint/type-overflow.stderr
+++ b/tests/ui/lint/type-overflow.stderr
@@ -66,9 +66,8 @@ LL |     let fail: i128 = 0x8000_0000_0000_0000_0000_0000_0000_0000;
    = help: consider using the type `u128` instead
 help: to use as a negative number (decimal `-170141183460469231731687303715884105728`), consider using the type `u128` for the literal and cast it to `i128`
    |
-LL -     let fail: i128 = 0x8000_0000_0000_0000_0000_0000_0000_0000;
-LL +     let fail: i128 = 0x8000_0000_0000_0000_0000_0000_0000_0000u128 as i128;
-   |
+LL |     let fail: i128 = 0x8000_0000_0000_0000_0000_0000_0000_0000u128 as i128;
+   |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 warning: literal out of range for `i32`
   --> $DIR/type-overflow.rs:27:16
@@ -117,9 +116,8 @@ LL |     let fail = 0x8FFF_FFFF_FFFF_FFFE;
    = help: consider using the type `u64` instead
 help: to use as a negative number (decimal `-2`), consider using the type `u32` for the literal and cast it to `i32`
    |
-LL -     let fail = 0x8FFF_FFFF_FFFF_FFFE;
-LL +     let fail = 0x8FFF_FFFF_FFFF_FFFEu32 as i32;
-   |
+LL |     let fail = 0x8FFF_FFFF_FFFF_FFFEu32 as i32;
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 warning: literal out of range for `i8`
   --> $DIR/type-overflow.rs:46:17
diff --git a/tests/ui/lint/unused/issue-67691-unused-field-in-or-pattern.stderr b/tests/ui/lint/unused/issue-67691-unused-field-in-or-pattern.stderr
index 8922f484d3e..a5bd396f73f 100644
--- a/tests/ui/lint/unused/issue-67691-unused-field-in-or-pattern.stderr
+++ b/tests/ui/lint/unused/issue-67691-unused-field-in-or-pattern.stderr
@@ -12,9 +12,8 @@ LL | #![deny(unused)]
    = note: `#[deny(unused_variables)]` implied by `#[deny(unused)]`
 help: try ignoring the field
    |
-LL -         A { i, j } | B { i, j } => {
-LL +         A { i, j: _ } | B { i, j: _ } => {
-   |
+LL |         A { i, j: _ } | B { i, j: _ } => {
+   |                ~~~~            ~~~~
 
 error: unused variable: `j`
   --> $DIR/issue-67691-unused-field-in-or-pattern.rs:30:16
@@ -36,9 +35,8 @@ LL |         Some(A { i, j } | B { i, j }) => {
    |
 help: try ignoring the field
    |
-LL -         Some(A { i, j } | B { i, j }) => {
-LL +         Some(A { i, j: _ } | B { i, j: _ }) => {
-   |
+LL |         Some(A { i, j: _ } | B { i, j: _ }) => {
+   |                     ~~~~            ~~~~
 
 error: unused variable: `j`
   --> $DIR/issue-67691-unused-field-in-or-pattern.rs:52:21
diff --git a/tests/ui/lint/wide_pointer_comparisons.stderr b/tests/ui/lint/wide_pointer_comparisons.stderr
index f5f8060902b..5a0b914d832 100644
--- a/tests/ui/lint/wide_pointer_comparisons.stderr
+++ b/tests/ui/lint/wide_pointer_comparisons.stderr
@@ -627,9 +627,8 @@ LL |         cmp!(a, b);
    |
 help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
    |
-LL -         cmp!(a, b);
-LL +         cmp!(std::ptr::addr_eq(a, b));
-   |
+LL |         cmp!(std::ptr::addr_eq(a, b));
+   |              ++++++++++++++++++    +
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:159:39
diff --git a/tests/ui/macros/expr_2021_cargo_fix_edition.stderr b/tests/ui/macros/expr_2021_cargo_fix_edition.stderr
index 8ab6938fe19..fe1fd4a26a0 100644
--- a/tests/ui/macros/expr_2021_cargo_fix_edition.stderr
+++ b/tests/ui/macros/expr_2021_cargo_fix_edition.stderr
@@ -13,9 +13,8 @@ LL | #![warn(edition_2024_expr_fragment_specifier)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: to keep the existing behavior, use the `expr_2021` fragment specifier
    |
-LL -     ($e:expr) => {
-LL +     ($e:expr_2021) => {
-   |
+LL |     ($e:expr_2021) => {
+   |         ~~~~~~~~~
 
 warning: the `expr` fragment specifier will accept more expressions in the 2024 edition
   --> $DIR/expr_2021_cargo_fix_edition.rs:11:11
@@ -27,9 +26,8 @@ LL |     ($($i:expr)*) => { };
    = note: for more information, see Migration Guide <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/macro-fragment-specifiers.html>
 help: to keep the existing behavior, use the `expr_2021` fragment specifier
    |
-LL -     ($($i:expr)*) => { };
-LL +     ($($i:expr_2021)*) => { };
-   |
+LL |     ($($i:expr_2021)*) => { };
+   |           ~~~~~~~~~
 
 warning: 2 warnings emitted
 
diff --git a/tests/ui/macros/macro-backtrace-invalid-internals.stderr b/tests/ui/macros/macro-backtrace-invalid-internals.stderr
index bb8250d58b0..aa8f06a0df1 100644
--- a/tests/ui/macros/macro-backtrace-invalid-internals.stderr
+++ b/tests/ui/macros/macro-backtrace-invalid-internals.stderr
@@ -43,9 +43,8 @@ LL |     real_method_stmt!();
    = note: this error originates in the macro `real_method_stmt` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: you must specify a concrete type for this numeric value, like `f32`
    |
-LL -           2.0.neg()
-LL +           2.0_f32.neg()
-   |
+LL |           2.0_f32.neg()
+   |           ~~~~~~~
 
 error[E0599]: no method named `fake` found for type `{integer}` in the current scope
   --> $DIR/macro-backtrace-invalid-internals.rs:23:13
@@ -92,9 +91,8 @@ LL |     let _ = real_method_expr!();
    = note: this error originates in the macro `real_method_expr` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: you must specify a concrete type for this numeric value, like `f32`
    |
-LL -           2.0.neg()
-LL +           2.0_f32.neg()
-   |
+LL |           2.0_f32.neg()
+   |           ~~~~~~~
 
 error: aborting due to 8 previous errors
 
diff --git a/tests/ui/methods/issues/issue-90315.stderr b/tests/ui/methods/issues/issue-90315.stderr
index e194a918834..0466bb0a0c9 100644
--- a/tests/ui/methods/issues/issue-90315.stderr
+++ b/tests/ui/methods/issues/issue-90315.stderr
@@ -181,9 +181,8 @@ LL |     let _res: i32 = ..6.take(2).sum();
    |
 help: you must specify a concrete type for this numeric value, like `i32`
    |
-LL -     let _res: i32 = ..6.take(2).sum();
-LL +     let _res: i32 = ..6_i32.take(2).sum();
-   |
+LL |     let _res: i32 = ..6_i32.take(2).sum();
+   |                       ~~~~~
 
 error: aborting due to 18 previous errors
 
diff --git a/tests/ui/methods/method-on-ambiguous-numeric-type.stderr b/tests/ui/methods/method-on-ambiguous-numeric-type.stderr
index d688bcc90c8..12427040272 100644
--- a/tests/ui/methods/method-on-ambiguous-numeric-type.stderr
+++ b/tests/ui/methods/method-on-ambiguous-numeric-type.stderr
@@ -6,9 +6,8 @@ LL |     let x = 2.0.neg();
    |
 help: you must specify a concrete type for this numeric value, like `f32`
    |
-LL -     let x = 2.0.neg();
-LL +     let x = 2.0_f32.neg();
-   |
+LL |     let x = 2.0_f32.neg();
+   |             ~~~~~~~
 
 error[E0689]: can't call method `neg` on ambiguous numeric type `{float}`
   --> $DIR/method-on-ambiguous-numeric-type.rs:17:15
diff --git a/tests/ui/mir/issue-112269.stderr b/tests/ui/mir/issue-112269.stderr
index 29b69cb7e20..80f329e2ce0 100644
--- a/tests/ui/mir/issue-112269.stderr
+++ b/tests/ui/mir/issue-112269.stderr
@@ -11,9 +11,8 @@ LL |     let x: i32 = 3;
    = note: the matched value is of type `i32`
 help: introduce a variable instead
    |
-LL -     let x: i32 = 3;
-LL +     let x_var: i32 = 3;
-   |
+LL |     let x_var: i32 = 3;
+   |         ~~~~~
 
 error[E0005]: refutable pattern in local binding
   --> $DIR/issue-112269.rs:7:9
@@ -28,9 +27,8 @@ LL |     let y = 4;
    = note: the matched value is of type `i32`
 help: introduce a variable instead
    |
-LL -     let y = 4;
-LL +     let y_var = 4;
-   |
+LL |     let y_var = 4;
+   |         ~~~~~
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/moves/use_of_moved_value_copy_suggestions.stderr b/tests/ui/moves/use_of_moved_value_copy_suggestions.stderr
index 62f087ca6b7..784945dbbae 100644
--- a/tests/ui/moves/use_of_moved_value_copy_suggestions.stderr
+++ b/tests/ui/moves/use_of_moved_value_copy_suggestions.stderr
@@ -195,9 +195,8 @@ LL |     [t, t];
    |      - you could clone this value
 help: consider further restricting type parameter `T` with trait `Copy`
    |
-LL -     T:,
-LL +     T:, T: Copy
-   |
+LL |     T:, T: Copy
+   |       ~~~~~~~~~
 
 error: aborting due to 11 previous errors
 
diff --git a/tests/ui/nll/ty-outlives/projection-no-regions-closure.stderr b/tests/ui/nll/ty-outlives/projection-no-regions-closure.stderr
index 980670fee69..4f93fb4eaea 100644
--- a/tests/ui/nll/ty-outlives/projection-no-regions-closure.stderr
+++ b/tests/ui/nll/ty-outlives/projection-no-regions-closure.stderr
@@ -33,9 +33,8 @@ LL |     with_signature(x, |mut y| Box::new(y.next()))
    |
 help: consider adding an explicit lifetime bound
    |
-LL -     T: Iterator,
-LL +     T: Iterator, <T as Iterator>::Item: 'a
-   |
+LL |     T: Iterator, <T as Iterator>::Item: 'a
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 note: external requirements
   --> $DIR/projection-no-regions-closure.rs:34:23
@@ -96,9 +95,8 @@ LL |     with_signature(x, |mut y| Box::new(y.next()))
    |
 help: consider adding an explicit lifetime bound
    |
-LL -     T: 'b + Iterator,
-LL +     T: 'b + Iterator, <T as Iterator>::Item: 'a
-   |
+LL |     T: 'b + Iterator, <T as Iterator>::Item: 'a
+   |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 note: external requirements
   --> $DIR/projection-no-regions-closure.rs:52:23
diff --git a/tests/ui/nll/ty-outlives/projection-no-regions-fn.stderr b/tests/ui/nll/ty-outlives/projection-no-regions-fn.stderr
index 53da981d702..da76ac1c474 100644
--- a/tests/ui/nll/ty-outlives/projection-no-regions-fn.stderr
+++ b/tests/ui/nll/ty-outlives/projection-no-regions-fn.stderr
@@ -9,9 +9,8 @@ LL |     Box::new(x.next())
    |
 help: consider adding an explicit lifetime bound
    |
-LL -     T: Iterator,
-LL +     T: Iterator, <T as Iterator>::Item: 'a
-   |
+LL |     T: Iterator, <T as Iterator>::Item: 'a
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0309]: the associated type `<T as Iterator>::Item` may not live long enough
   --> $DIR/projection-no-regions-fn.rs:28:5
@@ -24,9 +23,8 @@ LL |     Box::new(x.next())
    |
 help: consider adding an explicit lifetime bound
    |
-LL -     T: 'b + Iterator,
-LL +     T: 'b + Iterator, <T as Iterator>::Item: 'a
-   |
+LL |     T: 'b + Iterator, <T as Iterator>::Item: 'a
+   |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr b/tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr
index 34498f68f67..9eff4bb8c6c 100644
--- a/tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr
+++ b/tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr
@@ -34,9 +34,8 @@ LL |     with_signature(cell, t, |cell, t| require(cell, t));
    |
 help: consider adding an explicit lifetime bound
    |
-LL -     T: Anything<'b, 'c>,
-LL +     T: Anything<'b, 'c>, <T as Anything<'b/#0, 'c/#1>>::AssocType: 'a
-   |
+LL |     T: Anything<'b, 'c>, <T as Anything<'b/#0, 'c/#1>>::AssocType: 'a
+   |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 note: external requirements
   --> $DIR/projection-two-region-trait-bound-closure.rs:48:29
@@ -74,9 +73,8 @@ LL |     with_signature(cell, t, |cell, t| require(cell, t));
    |
 help: consider adding an explicit lifetime bound
    |
-LL -     'a: 'a,
-LL +     'a: 'a, <T as Anything<'b/#1, 'c/#2>>::AssocType: 'a
-   |
+LL |     'a: 'a, <T as Anything<'b/#1, 'c/#2>>::AssocType: 'a
+   |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 note: external requirements
   --> $DIR/projection-two-region-trait-bound-closure.rs:61:29
diff --git a/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr b/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr
index a53c01e506e..dfc024baed7 100644
--- a/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr
+++ b/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr
@@ -9,9 +9,8 @@ LL |     bar::<T::Output>()
    |
 help: consider adding an explicit lifetime bound
    |
-LL -     <T as MyTrait<'a>>::Output: 'b,
-LL +     <T as MyTrait<'a>>::Output: 'b, <T as MyTrait<'a>>::Output: 'a
-   |
+LL |     <T as MyTrait<'a>>::Output: 'b, <T as MyTrait<'a>>::Output: 'a
+   |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr b/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr
index 36a0f40246e..a43b4629cc3 100644
--- a/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr
+++ b/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr
@@ -9,9 +9,8 @@ LL |     bar::<<T as MyTrait<'a>>::Output>()
    |
 help: consider adding an explicit lifetime bound
    |
-LL -     <T as MyTrait<'b>>::Output: 'a,
-LL +     <T as MyTrait<'b>>::Output: 'a, <T as MyTrait<'a>>::Output: 'a
-   |
+LL |     <T as MyTrait<'b>>::Output: 'a, <T as MyTrait<'a>>::Output: 'a
+   |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/char/whitespace-character-literal.stderr b/tests/ui/parser/char/whitespace-character-literal.stderr
index 53f2eb3ecba..f273b5d61d5 100644
--- a/tests/ui/parser/char/whitespace-character-literal.stderr
+++ b/tests/ui/parser/char/whitespace-character-literal.stderr
@@ -11,9 +11,8 @@ LL |     let _hair_space_around = ' x​';
    |                               ^^
 help: consider removing the non-printing characters
    |
-LL -     let _hair_space_around = ' x​';
-LL +     let _hair_space_around = 'x​';
-   |
+LL |     let _hair_space_around = 'x​';
+   |                               ~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/extern-no-fn.stderr b/tests/ui/parser/extern-no-fn.stderr
index 2ee905429c4..03826e4a93b 100644
--- a/tests/ui/parser/extern-no-fn.stderr
+++ b/tests/ui/parser/extern-no-fn.stderr
@@ -11,9 +11,8 @@ LL | }
    |
 help: if you meant to call a macro, try
    |
-LL -     f();
-LL +     f!();
-   |
+LL |     f!();
+   |     ~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/issues/issue-87086-colon-path-sep.stderr b/tests/ui/parser/issues/issue-87086-colon-path-sep.stderr
index fa848368945..f6330e51e0d 100644
--- a/tests/ui/parser/issues/issue-87086-colon-path-sep.stderr
+++ b/tests/ui/parser/issues/issue-87086-colon-path-sep.stderr
@@ -8,9 +8,8 @@ LL |         Foo:Bar => {}
    |
 help: maybe write a path separator here
    |
-LL -         Foo:Bar => {}
-LL +         Foo::Bar => {}
-   |
+LL |         Foo::Bar => {}
+   |            ~~
 
 error: expected one of `!`, `(`, `...`, `..=`, `..`, `::`, `{`, or `|`, found `:`
   --> $DIR/issue-87086-colon-path-sep.rs:23:17
@@ -22,9 +21,8 @@ LL |         qux::Foo:Bar => {}
    |
 help: maybe write a path separator here
    |
-LL -         qux::Foo:Bar => {}
-LL +         qux::Foo::Bar => {}
-   |
+LL |         qux::Foo::Bar => {}
+   |                 ~~
 
 error: expected one of `@` or `|`, found `:`
   --> $DIR/issue-87086-colon-path-sep.rs:29:12
@@ -36,9 +34,8 @@ LL |         qux:Foo::Baz => {}
    |
 help: maybe write a path separator here
    |
-LL -         qux:Foo::Baz => {}
-LL +         qux::Foo::Baz => {}
-   |
+LL |         qux::Foo::Baz => {}
+   |            ~~
 
 error: expected one of `@` or `|`, found `:`
   --> $DIR/issue-87086-colon-path-sep.rs:35:12
@@ -64,9 +61,8 @@ LL |     if let Foo:Bar = f() {
    |
 help: maybe write a path separator here
    |
-LL -     if let Foo:Bar = f() {
-LL +     if let Foo::Bar = f() {
-   |
+LL |     if let Foo::Bar = f() {
+   |               ~~
 
 error: expected one of `@` or `|`, found `:`
   --> $DIR/issue-87086-colon-path-sep.rs:49:16
@@ -106,9 +102,8 @@ LL |         Foo:Bar::Baz => {}
    |
 help: maybe write a path separator here
    |
-LL -         Foo:Bar::Baz => {}
-LL +         Foo::Bar::Baz => {}
-   |
+LL |         Foo::Bar::Baz => {}
+   |            ~~
 
 error: expected one of `@` or `|`, found `:`
   --> $DIR/issue-87086-colon-path-sep.rs:75:12
@@ -120,9 +115,8 @@ LL |         Foo:Bar => {}
    |
 help: maybe write a path separator here
    |
-LL -         Foo:Bar => {}
-LL +         Foo::Bar => {}
-   |
+LL |         Foo::Bar => {}
+   |            ~~
 
 warning: irrefutable `if let` pattern
   --> $DIR/issue-87086-colon-path-sep.rs:40:8
diff --git a/tests/ui/parser/missing-fn-issue-65381-2.stderr b/tests/ui/parser/missing-fn-issue-65381-2.stderr
index ba2cf497df2..e13d395d70d 100644
--- a/tests/ui/parser/missing-fn-issue-65381-2.stderr
+++ b/tests/ui/parser/missing-fn-issue-65381-2.stderr
@@ -6,9 +6,8 @@ LL | main();
    |
 help: if you meant to call a macro, try
    |
-LL - main();
-LL + main!();
-   |
+LL | main!();
+   | ~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/misspelled-keywords/const.stderr b/tests/ui/parser/misspelled-keywords/const.stderr
index ca76f51f4ed..35e4d731db7 100644
--- a/tests/ui/parser/misspelled-keywords/const.stderr
+++ b/tests/ui/parser/misspelled-keywords/const.stderr
@@ -6,9 +6,8 @@ LL | cons A: u8 = 10;
    |
 help: there is a keyword `const` with a similar name
    |
-LL - cons A: u8 = 10;
-LL + const A: u8 = 10;
-   |
+LL | const A: u8 = 10;
+   | ~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/recover/turbofish-arg-with-stray-colon.stderr b/tests/ui/parser/recover/turbofish-arg-with-stray-colon.stderr
index 15866211954..551b2e3ff09 100644
--- a/tests/ui/parser/recover/turbofish-arg-with-stray-colon.stderr
+++ b/tests/ui/parser/recover/turbofish-arg-with-stray-colon.stderr
@@ -7,9 +7,8 @@ LL |     let x = Tr<A, A:>;
    = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 help: maybe write a path separator here
    |
-LL -     let x = Tr<A, A:>;
-LL +     let x = Tr<A, A::>;
-   |
+LL |     let x = Tr<A, A::>;
+   |                    ~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/use-colon-as-mod-sep.stderr b/tests/ui/parser/use-colon-as-mod-sep.stderr
index f25a779f31f..347b271df99 100644
--- a/tests/ui/parser/use-colon-as-mod-sep.stderr
+++ b/tests/ui/parser/use-colon-as-mod-sep.stderr
@@ -7,9 +7,8 @@ LL | use std::process:Command;
    = note: import paths are delimited using `::`
 help: use double colon
    |
-LL - use std::process:Command;
-LL + use std::process::Command;
-   |
+LL | use std::process::Command;
+   |                 ~~
 
 error: expected `::`, found `:`
   --> $DIR/use-colon-as-mod-sep.rs:5:8
@@ -20,9 +19,8 @@ LL | use std:fs::File;
    = note: import paths are delimited using `::`
 help: use double colon
    |
-LL - use std:fs::File;
-LL + use std::fs::File;
-   |
+LL | use std::fs::File;
+   |        ~~
 
 error: expected `::`, found `:`
   --> $DIR/use-colon-as-mod-sep.rs:7:8
@@ -33,9 +31,8 @@ LL | use std:collections:HashMap;
    = note: import paths are delimited using `::`
 help: use double colon
    |
-LL - use std:collections:HashMap;
-LL + use std::collections:HashMap;
-   |
+LL | use std::collections:HashMap;
+   |        ~~
 
 error: expected `::`, found `:`
   --> $DIR/use-colon-as-mod-sep.rs:7:20
@@ -46,9 +43,8 @@ LL | use std:collections:HashMap;
    = note: import paths are delimited using `::`
 help: use double colon
    |
-LL - use std:collections:HashMap;
-LL + use std:collections::HashMap;
-   |
+LL | use std:collections::HashMap;
+   |                    ~~
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/pattern/pat-tuple-field-count-cross.stderr b/tests/ui/pattern/pat-tuple-field-count-cross.stderr
index c084ec0b532..931db37c78e 100644
--- a/tests/ui/pattern/pat-tuple-field-count-cross.stderr
+++ b/tests/ui/pattern/pat-tuple-field-count-cross.stderr
@@ -121,9 +121,8 @@ LL | pub enum E1 { Z0, Z1(), S(u8, u8, u8) }
    |
 help: use the tuple variant pattern syntax instead
    |
-LL -         E1::Z1 => {}
-LL +         E1::Z1() => {}
-   |
+LL |         E1::Z1() => {}
+   |         ~~~~~~~~
 help: a unit variant with a similar name exists
    |
 LL -         E1::Z1 => {}
diff --git a/tests/ui/pattern/pat-tuple-overfield.stderr b/tests/ui/pattern/pat-tuple-overfield.stderr
index 4e8261cb15b..ea3663ea40e 100644
--- a/tests/ui/pattern/pat-tuple-overfield.stderr
+++ b/tests/ui/pattern/pat-tuple-overfield.stderr
@@ -155,9 +155,8 @@ LL |         E1::Z1 => {}
    |
 help: use the tuple variant pattern syntax instead
    |
-LL -         E1::Z1 => {}
-LL +         E1::Z1() => {}
-   |
+LL |         E1::Z1() => {}
+   |         ~~~~~~~~
 help: a unit variant with a similar name exists
    |
 LL -         E1::Z1 => {}
diff --git a/tests/ui/pattern/patkind-ref-binding-issue-114896.stderr b/tests/ui/pattern/patkind-ref-binding-issue-114896.stderr
index a12b94176c0..e9c2fccaba2 100644
--- a/tests/ui/pattern/patkind-ref-binding-issue-114896.stderr
+++ b/tests/ui/pattern/patkind-ref-binding-issue-114896.stderr
@@ -6,9 +6,8 @@ LL |         b.make_ascii_uppercase();
    |
 help: consider changing this to be mutable
    |
-LL -         let &b = a;
-LL +         let &(mut b) = a;
-   |
+LL |         let &(mut b) = a;
+   |             ~~~~~  +
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/pattern/patkind-ref-binding-issue-122415.stderr b/tests/ui/pattern/patkind-ref-binding-issue-122415.stderr
index 68141af4910..e93b8bbaccc 100644
--- a/tests/ui/pattern/patkind-ref-binding-issue-122415.stderr
+++ b/tests/ui/pattern/patkind-ref-binding-issue-122415.stderr
@@ -6,9 +6,8 @@ LL |     mutate(&mut x);
    |
 help: consider changing this to be mutable
    |
-LL - fn foo(&x: &i32) {
-LL + fn foo(&(mut x): &i32) {
-   |
+LL | fn foo(&(mut x): &i32) {
+   |        ~~~~~  +
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/privacy/privacy5.stderr b/tests/ui/privacy/privacy5.stderr
index 8f28f629ba3..ec3abe9b816 100644
--- a/tests/ui/privacy/privacy5.stderr
+++ b/tests/ui/privacy/privacy5.stderr
@@ -52,9 +52,8 @@ LL |     pub struct C(pub isize, isize);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: consider making the fields publicly accessible
    |
-LL -     pub struct C(pub isize, isize);
-LL +     pub struct C(pub isize, pub isize);
-   |
+LL |     pub struct C(pub isize, pub isize);
+   |                             +++
 
 error[E0603]: tuple struct constructor `A` is private
   --> $DIR/privacy5.rs:56:12
@@ -262,9 +261,8 @@ LL |     pub struct C(pub isize, isize);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: consider making the fields publicly accessible
    |
-LL -     pub struct C(pub isize, isize);
-LL +     pub struct C(pub isize, pub isize);
-   |
+LL |     pub struct C(pub isize, pub isize);
+   |                             +++
 
 error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:69:12
@@ -282,9 +280,8 @@ LL |     pub struct C(pub isize, isize);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: consider making the fields publicly accessible
    |
-LL -     pub struct C(pub isize, isize);
-LL +     pub struct C(pub isize, pub isize);
-   |
+LL |     pub struct C(pub isize, pub isize);
+   |                             +++
 
 error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:70:12
@@ -302,9 +299,8 @@ LL |     pub struct C(pub isize, isize);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: consider making the fields publicly accessible
    |
-LL -     pub struct C(pub isize, isize);
-LL +     pub struct C(pub isize, pub isize);
-   |
+LL |     pub struct C(pub isize, pub isize);
+   |                             +++
 
 error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:71:12
@@ -322,9 +318,8 @@ LL |     pub struct C(pub isize, isize);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: consider making the fields publicly accessible
    |
-LL -     pub struct C(pub isize, isize);
-LL +     pub struct C(pub isize, pub isize);
-   |
+LL |     pub struct C(pub isize, pub isize);
+   |                             +++
 
 error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:72:18
@@ -342,9 +337,8 @@ LL |     pub struct C(pub isize, isize);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: consider making the fields publicly accessible
    |
-LL -     pub struct C(pub isize, isize);
-LL +     pub struct C(pub isize, pub isize);
-   |
+LL |     pub struct C(pub isize, pub isize);
+   |                             +++
 
 error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:73:18
@@ -362,9 +356,8 @@ LL |     pub struct C(pub isize, isize);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: consider making the fields publicly accessible
    |
-LL -     pub struct C(pub isize, isize);
-LL +     pub struct C(pub isize, pub isize);
-   |
+LL |     pub struct C(pub isize, pub isize);
+   |                             +++
 
 error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:74:18
@@ -382,9 +375,8 @@ LL |     pub struct C(pub isize, isize);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: consider making the fields publicly accessible
    |
-LL -     pub struct C(pub isize, isize);
-LL +     pub struct C(pub isize, pub isize);
-   |
+LL |     pub struct C(pub isize, pub isize);
+   |                             +++
 
 error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:75:18
@@ -402,9 +394,8 @@ LL |     pub struct C(pub isize, isize);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: consider making the fields publicly accessible
    |
-LL -     pub struct C(pub isize, isize);
-LL +     pub struct C(pub isize, pub isize);
-   |
+LL |     pub struct C(pub isize, pub isize);
+   |                             +++
 
 error[E0603]: tuple struct constructor `A` is private
   --> $DIR/privacy5.rs:83:17
@@ -460,9 +451,8 @@ LL |     pub struct C(pub isize, isize);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: consider making the fields publicly accessible
    |
-LL -     pub struct C(pub isize, isize);
-LL +     pub struct C(pub isize, pub isize);
-   |
+LL |     pub struct C(pub isize, pub isize);
+   |                             +++
 
 error[E0603]: tuple struct constructor `A` is private
   --> $DIR/privacy5.rs:90:20
diff --git a/tests/ui/pub/pub-ident-fn-or-struct.stderr b/tests/ui/pub/pub-ident-fn-or-struct.stderr
index 1bdb547be1e..ceadc510c63 100644
--- a/tests/ui/pub/pub-ident-fn-or-struct.stderr
+++ b/tests/ui/pub/pub-ident-fn-or-struct.stderr
@@ -6,9 +6,8 @@ LL | pub S (foo) bar
    |
 help: if you meant to call a macro, try
    |
-LL - pub S (foo) bar
-LL + pub S! (foo) bar
-   |
+LL | pub S! (foo) bar
+   |     ~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/resolve/issue-39226.stderr b/tests/ui/resolve/issue-39226.stderr
index 3d771b4fc42..84f9ad531f0 100644
--- a/tests/ui/resolve/issue-39226.stderr
+++ b/tests/ui/resolve/issue-39226.stderr
@@ -9,9 +9,8 @@ LL |         handle: Handle
    |
 help: use struct literal syntax instead
    |
-LL -         handle: Handle
-LL +         handle: Handle {}
-   |
+LL |         handle: Handle {}
+   |                 ~~~~~~~~~
 help: a local variable with a similar name exists
    |
 LL -         handle: Handle
diff --git a/tests/ui/resolve/issue-55673.stderr b/tests/ui/resolve/issue-55673.stderr
index 30b1cd09085..86dfca068a3 100644
--- a/tests/ui/resolve/issue-55673.stderr
+++ b/tests/ui/resolve/issue-55673.stderr
@@ -18,9 +18,8 @@ LL |     T::Baa: std::fmt::Debug,
    |
 help: consider further restricting type parameter `T` with trait `Foo`
    |
-LL -     T::Baa: std::fmt::Debug,
-LL +     T::Baa: std::fmt::Debug, T: Foo
-   |
+LL |     T::Baa: std::fmt::Debug, T: Foo
+   |                            ~~~~~~~~
 help: ...and changing the associated type name
    |
 LL -     T::Baa: std::fmt::Debug,
diff --git a/tests/ui/resolve/issue-73427.stderr b/tests/ui/resolve/issue-73427.stderr
index 890bb04f24d..3c49fe3a8de 100644
--- a/tests/ui/resolve/issue-73427.stderr
+++ b/tests/ui/resolve/issue-73427.stderr
@@ -20,9 +20,8 @@ help: you might have meant to use one of the following enum variants
 LL -     A.foo();
 LL +     (A::Tuple()).foo();
    |
-LL -     A.foo();
-LL +     A::Unit.foo();
-   |
+LL |     A::Unit.foo();
+   |     ~~~~~~~
 help: alternatively, the following enum variant is available
    |
 LL -     A.foo();
@@ -61,9 +60,8 @@ LL | | }
    | |_^
 help: you might have meant to use the following enum variant
    |
-LL -     C.foo();
-LL +     C::Unit.foo();
-   |
+LL |     C::Unit.foo();
+   |     ~~~~~~~
 help: alternatively, the following enum variant is available
    |
 LL -     C.foo();
@@ -86,9 +84,8 @@ LL | | }
    | |_^
 help: you might have meant to use the following enum variant
    |
-LL -     D.foo();
-LL +     D::Unit.foo();
-   |
+LL |     D::Unit.foo();
+   |     ~~~~~~~
 help: alternatively, the following enum variant is available
    |
 LL -     D.foo();
@@ -144,12 +141,10 @@ LL | | }
    | |_^
 help: try to match against one of the enum's variants
    |
-LL -     if let A(3) = x { }
-LL +     if let A::Tuple(3) = x { }
-   |
-LL -     if let A(3) = x { }
-LL +     if let A::TupleWithFields(3) = x { }
-   |
+LL |     if let A::Tuple(3) = x { }
+   |            ~~~~~~~~
+LL |     if let A::TupleWithFields(3) = x { }
+   |            ~~~~~~~~~~~~~~~~~~
 
 error[E0423]: expected function, tuple struct or tuple variant, found enum `A`
   --> $DIR/issue-73427.rs:46:13
@@ -171,12 +166,10 @@ LL | | }
    | |_^
 help: try to construct one of the enum's variants
    |
-LL -     let x = A(3);
-LL +     let x = A::Tuple(3);
-   |
-LL -     let x = A(3);
-LL +     let x = A::TupleWithFields(3);
-   |
+LL |     let x = A::Tuple(3);
+   |             ~~~~~~~~
+LL |     let x = A::TupleWithFields(3);
+   |             ~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 7 previous errors
 
diff --git a/tests/ui/resolve/privacy-enum-ctor.stderr b/tests/ui/resolve/privacy-enum-ctor.stderr
index 3bbab3716af..fb6787274fa 100644
--- a/tests/ui/resolve/privacy-enum-ctor.stderr
+++ b/tests/ui/resolve/privacy-enum-ctor.stderr
@@ -124,9 +124,8 @@ LL | |     }
    | |_____^
 help: you might have meant to use the following enum variant
    |
-LL -     let _: E = E;
-LL +     let _: E = E::Unit;
-   |
+LL |     let _: E = E::Unit;
+   |                ~~~~~~~
 help: alternatively, the following enum variant is available
    |
 LL -     let _: E = E;
diff --git a/tests/ui/resolve/resolve-issue-135614-assoc-const.import_trait_associated_functions.stderr b/tests/ui/resolve/resolve-issue-135614-assoc-const.import_trait_associated_functions.stderr
index 3d6d47578c3..b41fa1818e2 100644
--- a/tests/ui/resolve/resolve-issue-135614-assoc-const.import_trait_associated_functions.stderr
+++ b/tests/ui/resolve/resolve-issue-135614-assoc-const.import_trait_associated_functions.stderr
@@ -11,9 +11,8 @@ LL |     const DEFAULT: u32 = 0;
    = note: the matched value is of type `u32`
 help: introduce a variable instead
    |
-LL -     let DEFAULT: u32 = 0;
-LL +     let DEFAULT_var: u32 = 0;
-   |
+LL |     let DEFAULT_var: u32 = 0;
+   |         ~~~~~~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/resolve/resolve-issue-135614-assoc-const.normal.stderr b/tests/ui/resolve/resolve-issue-135614-assoc-const.normal.stderr
index f041487da41..908f5bdd897 100644
--- a/tests/ui/resolve/resolve-issue-135614-assoc-const.normal.stderr
+++ b/tests/ui/resolve/resolve-issue-135614-assoc-const.normal.stderr
@@ -21,9 +21,8 @@ LL |     const DEFAULT: u32 = 0;
    = note: the matched value is of type `u32`
 help: introduce a variable instead
    |
-LL -     let DEFAULT: u32 = 0;
-LL +     let DEFAULT_var: u32 = 0;
-   |
+LL |     let DEFAULT_var: u32 = 0;
+   |         ~~~~~~~~~~~
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr b/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr
index 15fdb975a1b..d183f06c5fd 100644
--- a/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr
+++ b/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr
@@ -66,9 +66,8 @@ LL |         Self::BAR;
    |         ++++++
 help: a constant with a similar name exists
    |
-LL -         BAR;
-LL +         BARR;
-   |
+LL |         BARR;
+   |         ~~~~
 
 error[E0412]: cannot find type `Baz` in this scope
   --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:37:18
diff --git a/tests/ui/resolve/typo-suggestion-mistyped-in-path.stderr b/tests/ui/resolve/typo-suggestion-mistyped-in-path.stderr
index 1ea7f1d39cb..e7651f7704c 100644
--- a/tests/ui/resolve/typo-suggestion-mistyped-in-path.stderr
+++ b/tests/ui/resolve/typo-suggestion-mistyped-in-path.stderr
@@ -39,9 +39,8 @@ LL |     modul::foo();
    |
 help: there is a crate or module with a similar name
    |
-LL -     modul::foo();
-LL +     module::foo();
-   |
+LL |     module::foo();
+   |     ~~~~~~
 
 error[E0433]: failed to resolve: use of undeclared type `Trai`
   --> $DIR/typo-suggestion-mistyped-in-path.rs:39:5
diff --git a/tests/ui/stability-attribute/const-stability-attribute-implies-using-stable.stderr b/tests/ui/stability-attribute/const-stability-attribute-implies-using-stable.stderr
index 4cbd93d17cf..050834ab676 100644
--- a/tests/ui/stability-attribute/const-stability-attribute-implies-using-stable.stderr
+++ b/tests/ui/stability-attribute/const-stability-attribute-implies-using-stable.stderr
@@ -11,9 +11,8 @@ LL | #![deny(stable_features)]
    |         ^^^^^^^^^^^^^^^
 help: if you are using features which are still unstable, change to using `const_foobar`
    |
-LL - #![feature(const_foo)]
-LL + #![feature(const_foobar)]
-   |
+LL | #![feature(const_foobar)]
+   |            ~~~~~~~~~~~~
 help: if you are using features which are now stable, remove this line
    |
 LL - #![feature(const_foo)]
diff --git a/tests/ui/stability-attribute/const-stability-attribute-implies-using-unstable.stderr b/tests/ui/stability-attribute/const-stability-attribute-implies-using-unstable.stderr
index 38331919ee8..50cc14c3b4f 100644
--- a/tests/ui/stability-attribute/const-stability-attribute-implies-using-unstable.stderr
+++ b/tests/ui/stability-attribute/const-stability-attribute-implies-using-unstable.stderr
@@ -11,9 +11,8 @@ LL | #![deny(stable_features)]
    |         ^^^^^^^^^^^^^^^
 help: if you are using features which are still unstable, change to using `const_foobar`
    |
-LL - #![feature(const_foo)]
-LL + #![feature(const_foobar)]
-   |
+LL | #![feature(const_foobar)]
+   |            ~~~~~~~~~~~~
 help: if you are using features which are now stable, remove this line
    |
 LL - #![feature(const_foo)]
diff --git a/tests/ui/stability-attribute/stability-attribute-implies-using-stable.stderr b/tests/ui/stability-attribute/stability-attribute-implies-using-stable.stderr
index 1080b977410..d783f1e8e40 100644
--- a/tests/ui/stability-attribute/stability-attribute-implies-using-stable.stderr
+++ b/tests/ui/stability-attribute/stability-attribute-implies-using-stable.stderr
@@ -11,9 +11,8 @@ LL | #![deny(stable_features)]
    |         ^^^^^^^^^^^^^^^
 help: if you are using features which are still unstable, change to using `foobar`
    |
-LL - #![feature(foo)]
-LL + #![feature(foobar)]
-   |
+LL | #![feature(foobar)]
+   |            ~~~~~~
 help: if you are using features which are now stable, remove this line
    |
 LL - #![feature(foo)]
diff --git a/tests/ui/stability-attribute/stability-attribute-implies-using-unstable.stderr b/tests/ui/stability-attribute/stability-attribute-implies-using-unstable.stderr
index 02cb25633ab..4940650fd42 100644
--- a/tests/ui/stability-attribute/stability-attribute-implies-using-unstable.stderr
+++ b/tests/ui/stability-attribute/stability-attribute-implies-using-unstable.stderr
@@ -11,9 +11,8 @@ LL | #![deny(stable_features)]
    |         ^^^^^^^^^^^^^^^
 help: if you are using features which are still unstable, change to using `foobar`
    |
-LL - #![feature(foo)]
-LL + #![feature(foobar)]
-   |
+LL | #![feature(foobar)]
+   |            ~~~~~~
 help: if you are using features which are now stable, remove this line
    |
 LL - #![feature(foo)]
diff --git a/tests/ui/statics/issue-15261.stderr b/tests/ui/statics/issue-15261.stderr
index 7edd79e08b1..4067d151de3 100644
--- a/tests/ui/statics/issue-15261.stderr
+++ b/tests/ui/statics/issue-15261.stderr
@@ -9,9 +9,8 @@ LL | static n: &'static usize = unsafe { &n_mut };
    = note: `#[warn(static_mut_refs)]` on by default
 help: use `&raw const` instead to create a raw pointer
    |
-LL - static n: &'static usize = unsafe { &n_mut };
-LL + static n: &'static usize = unsafe { &raw const n_mut };
-   |
+LL | static n: &'static usize = unsafe { &raw const n_mut };
+   |                                     ~~~~~~~~~~
 
 warning: 1 warning emitted
 
diff --git a/tests/ui/statics/static-mut-shared-parens.stderr b/tests/ui/statics/static-mut-shared-parens.stderr
index f428f9a18d4..ad6ad68c315 100644
--- a/tests/ui/statics/static-mut-shared-parens.stderr
+++ b/tests/ui/statics/static-mut-shared-parens.stderr
@@ -9,9 +9,8 @@ LL |     let _ = unsafe { (&TEST) as *const usize };
    = note: `#[warn(static_mut_refs)]` on by default
 help: use `&raw const` instead to create a raw pointer
    |
-LL -     let _ = unsafe { (&TEST) as *const usize };
-LL +     let _ = unsafe { (&raw const TEST) as *const usize };
-   |
+LL |     let _ = unsafe { (&raw const TEST) as *const usize };
+   |                       ~~~~~~~~~~
 
 warning: creating a mutable reference to mutable static is discouraged
   --> $DIR/static-mut-shared-parens.rs:11:22
diff --git a/tests/ui/statics/static-mut-xc.stderr b/tests/ui/statics/static-mut-xc.stderr
index d03835c30d8..77ce49b883f 100644
--- a/tests/ui/statics/static-mut-xc.stderr
+++ b/tests/ui/statics/static-mut-xc.stderr
@@ -54,9 +54,8 @@ LL |     static_bound(&static_mut_xc::a);
    = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
 help: use `&raw const` instead to create a raw pointer
    |
-LL -     static_bound(&static_mut_xc::a);
-LL +     static_bound(&raw const static_mut_xc::a);
-   |
+LL |     static_bound(&raw const static_mut_xc::a);
+   |                  ~~~~~~~~~~
 
 warning: creating a mutable reference to mutable static is discouraged
   --> $DIR/static-mut-xc.rs:35:22
diff --git a/tests/ui/statics/static-recursive.stderr b/tests/ui/statics/static-recursive.stderr
index 8ea997fa214..f2dd5b8a6cf 100644
--- a/tests/ui/statics/static-recursive.stderr
+++ b/tests/ui/statics/static-recursive.stderr
@@ -9,9 +9,8 @@ LL | static mut S: *const u8 = unsafe { &S as *const *const u8 as *const u8 };
    = note: `#[warn(static_mut_refs)]` on by default
 help: use `&raw const` instead to create a raw pointer
    |
-LL - static mut S: *const u8 = unsafe { &S as *const *const u8 as *const u8 };
-LL + static mut S: *const u8 = unsafe { &raw const S as *const *const u8 as *const u8 };
-   |
+LL | static mut S: *const u8 = unsafe { &raw const S as *const *const u8 as *const u8 };
+   |                                    ~~~~~~~~~~
 
 warning: creating a shared reference to mutable static is discouraged
   --> $DIR/static-recursive.rs:19:20
diff --git a/tests/ui/structs/struct-fields-hints-no-dupe.stderr b/tests/ui/structs/struct-fields-hints-no-dupe.stderr
index 650f6ddfa88..2b88d802833 100644
--- a/tests/ui/structs/struct-fields-hints-no-dupe.stderr
+++ b/tests/ui/structs/struct-fields-hints-no-dupe.stderr
@@ -6,9 +6,8 @@ LL |         bar : 42,
    |
 help: a field with a similar name exists
    |
-LL -         bar : 42,
-LL +         barr : 42,
-   |
+LL |         barr : 42,
+   |         ~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/suggestions/bound-suggestions.stderr b/tests/ui/suggestions/bound-suggestions.stderr
index 51a6a51e7da..e30deb11398 100644
--- a/tests/ui/suggestions/bound-suggestions.stderr
+++ b/tests/ui/suggestions/bound-suggestions.stderr
@@ -43,9 +43,8 @@ LL |     println!("{:?} {:?}", x, y);
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider further restricting type parameter `Y` with trait `Debug`
    |
-LL - fn test_no_bounds_where<X, Y>(x: X, y: Y) where X: std::fmt::Debug, {
-LL + fn test_no_bounds_where<X, Y>(x: X, y: Y) where X: std::fmt::Debug, Y: std::fmt::Debug {
-   |
+LL | fn test_no_bounds_where<X, Y>(x: X, y: Y) where X: std::fmt::Debug, Y: std::fmt::Debug {
+   |                                                                   ~~~~~~~~~~~~~~~~~~~~
 
 error[E0277]: `X` doesn't implement `Debug`
   --> $DIR/bound-suggestions.rs:33:22
diff --git a/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.stderr b/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.stderr
index 55a353c40ca..4f92d3aceef 100644
--- a/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.stderr
+++ b/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.stderr
@@ -12,9 +12,8 @@ LL |     const A: i32 = 2;
    = note: the matched value is of type `i32`
 help: introduce a variable instead
    |
-LL -     let A = 3;
-LL +     let A_var = 3;
-   |
+LL |     let A_var = 3;
+   |         ~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/suggestions/crate-or-module-typo.stderr b/tests/ui/suggestions/crate-or-module-typo.stderr
index 0ca0582105b..cbe765731b4 100644
--- a/tests/ui/suggestions/crate-or-module-typo.stderr
+++ b/tests/ui/suggestions/crate-or-module-typo.stderr
@@ -6,9 +6,8 @@ LL | use st::cell::Cell;
    |
 help: there is a crate or module with a similar name
    |
-LL - use st::cell::Cell;
-LL + use std::cell::Cell;
-   |
+LL | use std::cell::Cell;
+   |     ~~~
 
 error[E0432]: unresolved import `bas`
   --> $DIR/crate-or-module-typo.rs:11:5
@@ -30,9 +29,8 @@ LL |     bar: st::cell::Cell<bool>
    |
 help: there is a crate or module with a similar name
    |
-LL -     bar: st::cell::Cell<bool>
-LL +     bar: std::cell::Cell<bool>
-   |
+LL |     bar: std::cell::Cell<bool>
+   |          ~~~
 help: consider importing this module
    |
 LL + use std::cell;
diff --git a/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.stderr b/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.stderr
index ac93c5df05e..a58c2a584f7 100644
--- a/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.stderr
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.stderr
@@ -20,9 +20,8 @@ LL |     fn foo(&self) where Self: Other, { }
    |            +++++
 help: alternatively, consider constraining `foo` so it does not apply to trait objects
    |
-LL -     fn foo() where Self: Other, { }
-LL +     fn foo() where Self: Other, Self: Sized { }
-   |
+LL |     fn foo() where Self: Other, Self: Sized { }
+   |                               ~~~~~~~~~~~~~
 help: consider changing method `bar`'s `self` parameter to be `&self`
    |
 LL -     fn bar(self: ()) {}
diff --git a/tests/ui/suggestions/field-access.stderr b/tests/ui/suggestions/field-access.stderr
index 4696950930f..7d816b5bfdd 100644
--- a/tests/ui/suggestions/field-access.stderr
+++ b/tests/ui/suggestions/field-access.stderr
@@ -11,9 +11,8 @@ LL |     if let B::Fst = a {};
    |
 help: you might have meant to use field `b` whose type is `B`
    |
-LL -     if let B::Fst = a {};
-LL +     if let B::Fst = a.b {};
-   |
+LL |     if let B::Fst = a.b {};
+   |                     ~~~
 
 error[E0308]: mismatched types
   --> $DIR/field-access.rs:25:9
@@ -29,9 +28,8 @@ LL |         B::Fst => (),
    |
 help: you might have meant to use field `b` whose type is `B`
    |
-LL -     match a {
-LL +     match a.b {
-   |
+LL |     match a.b {
+   |           ~~~
 
 error[E0308]: mismatched types
   --> $DIR/field-access.rs:26:9
@@ -47,9 +45,8 @@ LL |         B::Snd => (),
    |
 help: you might have meant to use field `b` whose type is `B`
    |
-LL -     match a {
-LL +     match a.b {
-   |
+LL |     match a.b {
+   |           ~~~
 
 error[E0308]: mismatched types
   --> $DIR/field-access.rs:32:9
diff --git a/tests/ui/suggestions/imm-ref-trait-object-literal.stderr b/tests/ui/suggestions/imm-ref-trait-object-literal.stderr
index 90dee9005ab..79fa468dc49 100644
--- a/tests/ui/suggestions/imm-ref-trait-object-literal.stderr
+++ b/tests/ui/suggestions/imm-ref-trait-object-literal.stderr
@@ -14,9 +14,8 @@ LL | fn foo<X: Trait>(_: X) {}
    |           ^^^^^ required by this bound in `foo`
 help: consider changing this borrow's mutability
    |
-LL -   foo(&s);
-LL +   foo(&mut s);
-   |
+LL |   foo(&mut s);
+   |       ~~~~
 
 error[E0277]: the trait bound `S: Trait` is not satisfied
   --> $DIR/imm-ref-trait-object-literal.rs:13:7
diff --git a/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr b/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr
index 299cf1d74d5..89cda2a56e0 100644
--- a/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr
+++ b/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr
@@ -11,9 +11,8 @@ LL |     fn g(mut x: impl Iterator<Item = &()>) -> Option<&'static ()> { x.next(
    |                                                       +++++++
 help: consider introducing a named lifetime parameter
    |
-LL -     fn g(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next() }
-LL +     fn g<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'a ()> { x.next() }
-   |
+LL |     fn g<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'a ()> { x.next() }
+   |         ++++                             ~~~                ~~~
 help: alternatively, you might want to return an owned value
    |
 LL -     fn g(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next() }
@@ -33,9 +32,8 @@ LL |     async fn i(mut x: impl Iterator<Item = &()>) -> Option<&'static ()> { x
    |                                                             +++++++
 help: consider introducing a named lifetime parameter
    |
-LL -     async fn i(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next() }
-LL +     async fn i<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'a ()> { x.next() }
-   |
+LL |     async fn i<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'a ()> { x.next() }
+   |               ++++                             ~~~                ~~~
 help: alternatively, you might want to return an owned value
    |
 LL -     async fn i(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next() }
@@ -101,9 +99,8 @@ LL |     fn g(mut x: impl Foo) -> Option<&'static ()> { x.next() }
    |                                      +++++++
 help: consider introducing a named lifetime parameter
    |
-LL -     fn g(mut x: impl Foo) -> Option<&()> { x.next() }
-LL +     fn g<'a>(mut x: impl Foo) -> Option<&'a ()> { x.next() }
-   |
+LL |     fn g<'a>(mut x: impl Foo) -> Option<&'a ()> { x.next() }
+   |         ++++                            ~~~
 help: alternatively, you might want to return an owned value
    |
 LL -     fn g(mut x: impl Foo) -> Option<&()> { x.next() }
@@ -123,9 +120,8 @@ LL |     fn g(mut x: impl Foo<()>) -> Option<&'static ()> { x.next() }
    |                                          +++++++
 help: consider introducing a named lifetime parameter
    |
-LL -     fn g(mut x: impl Foo<()>) -> Option<&()> { x.next() }
-LL +     fn g<'a>(mut x: impl Foo<()>) -> Option<&'a ()> { x.next() }
-   |
+LL |     fn g<'a>(mut x: impl Foo<()>) -> Option<&'a ()> { x.next() }
+   |         ++++                                ~~~
 help: alternatively, you might want to return an owned value
    |
 LL -     fn g(mut x: impl Foo<()>) -> Option<&()> { x.next() }
diff --git a/tests/ui/suggestions/recover-missing-turbofish-surrounding-angle-braket.stderr b/tests/ui/suggestions/recover-missing-turbofish-surrounding-angle-braket.stderr
index 06f465e9c0d..d43d1f9bb7e 100644
--- a/tests/ui/suggestions/recover-missing-turbofish-surrounding-angle-braket.stderr
+++ b/tests/ui/suggestions/recover-missing-turbofish-surrounding-angle-braket.stderr
@@ -41,9 +41,8 @@ LL |     let _ = vec![1, 2, 3].into_iter().collect::Vec<_>>();
    |
 help: surround the type parameters with angle brackets
    |
-LL -     let _ = vec![1, 2, 3].into_iter().collect::Vec<_>>();
-LL +     let _ = vec![1, 2, 3].into_iter().collect::<Vec<_>>();
-   |
+LL |     let _ = vec![1, 2, 3].into_iter().collect::<Vec<_>>();
+   |                                                +
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/suggestions/struct-field-type-including-single-colon.stderr b/tests/ui/suggestions/struct-field-type-including-single-colon.stderr
index 247454b8710..4dd514480da 100644
--- a/tests/ui/suggestions/struct-field-type-including-single-colon.stderr
+++ b/tests/ui/suggestions/struct-field-type-including-single-colon.stderr
@@ -6,9 +6,8 @@ LL |     a: foo:A,
    |
 help: write a path separator here
    |
-LL -     a: foo:A,
-LL +     a: foo::A,
-   |
+LL |     a: foo::A,
+   |           ~~
 
 error: expected `,`, or `}`, found `:`
   --> $DIR/struct-field-type-including-single-colon.rs:9:11
@@ -26,9 +25,8 @@ LL |     b: foo::bar:B,
    |
 help: write a path separator here
    |
-LL -     b: foo::bar:B,
-LL +     b: foo::bar::B,
-   |
+LL |     b: foo::bar::B,
+   |                ~~
 
 error: expected `,`, or `}`, found `:`
   --> $DIR/struct-field-type-including-single-colon.rs:15:16
diff --git a/tests/ui/suggestions/suggest-change-mut.stderr b/tests/ui/suggestions/suggest-change-mut.stderr
index 5315456efea..216d1e810fd 100644
--- a/tests/ui/suggestions/suggest-change-mut.stderr
+++ b/tests/ui/suggestions/suggest-change-mut.stderr
@@ -19,9 +19,8 @@ LL | fn issue_81421<T: Read + Write>(mut stream: T) where &T: std::io::Read {
    |                                                +++++++++++++++++++++++
 help: consider changing this borrow's mutability
    |
-LL -         let mut stream_reader = BufReader::new(&stream);
-LL +         let mut stream_reader = BufReader::new(&mut stream);
-   |
+LL |         let mut stream_reader = BufReader::new(&mut stream);
+   |                                                ~~~~
 
 error[E0599]: the method `read_until` exists for struct `BufReader<&T>`, but its trait bounds were not satisfied
   --> $DIR/suggest-change-mut.rs:16:23
diff --git a/tests/ui/suggestions/suggest-methods.stderr b/tests/ui/suggestions/suggest-methods.stderr
index 6f1c2cc4cab..f9f6e5f86fc 100644
--- a/tests/ui/suggestions/suggest-methods.stderr
+++ b/tests/ui/suggestions/suggest-methods.stderr
@@ -45,9 +45,8 @@ LL |     let _ = 63u32.count_o();
    |
 help: there is a method `count_ones` with a similar name
    |
-LL -     let _ = 63u32.count_o();
-LL +     let _ = 63u32.count_ones();
-   |
+LL |     let _ = 63u32.count_ones();
+   |                   ~~~~~~~~~~
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/suggestions/suggest-variants.stderr b/tests/ui/suggestions/suggest-variants.stderr
index b422da8fbfa..7d62604e23f 100644
--- a/tests/ui/suggestions/suggest-variants.stderr
+++ b/tests/ui/suggestions/suggest-variants.stderr
@@ -24,9 +24,8 @@ LL |     println!("My shape is {:?}", Shape::Circl { size: 5});
    |
 help: there is a variant with a similar name
    |
-LL -     println!("My shape is {:?}", Shape::Circl { size: 5});
-LL +     println!("My shape is {:?}", Shape::Circle { size: 5});
-   |
+LL |     println!("My shape is {:?}", Shape::Circle { size: 5});
+   |                                         ~~~~~~
 
 error[E0599]: no variant named `Rombus` found for enum `Shape`
   --> $DIR/suggest-variants.rs:14:41
@@ -63,9 +62,8 @@ LL |     Shape::Circl;
    |
 help: there is a variant with a similar name
    |
-LL -     Shape::Circl;
-LL +     Shape::Circle { radius: /* value */ };
-   |
+LL |     Shape::Circle { radius: /* value */ };
+   |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0599]: no variant or associated item named `Rombus` found for enum `Shape` in the current scope
   --> $DIR/suggest-variants.rs:17:12
diff --git a/tests/ui/suggestions/type-ascription-instead-of-path-2.stderr b/tests/ui/suggestions/type-ascription-instead-of-path-2.stderr
index 70e8f5b58ac..ba0682cda32 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-path-2.stderr
+++ b/tests/ui/suggestions/type-ascription-instead-of-path-2.stderr
@@ -7,9 +7,8 @@ LL |     let _ = vec![Ok(2)].into_iter().collect:<Result<Vec<_>,_>>()?;
    = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 help: maybe write a path separator here
    |
-LL -     let _ = vec![Ok(2)].into_iter().collect:<Result<Vec<_>,_>>()?;
-LL +     let _ = vec![Ok(2)].into_iter().collect::<Result<Vec<_>,_>>()?;
-   |
+LL |     let _ = vec![Ok(2)].into_iter().collect::<Result<Vec<_>,_>>()?;
+   |                                            ~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr b/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr
index 5ba56d095f7..56b6a69a283 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr
+++ b/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr
@@ -6,9 +6,8 @@ LL |     let _: Vec<A:B> = A::B;
    |
 help: you might have meant to write a path instead of an associated type bound
    |
-LL -     let _: Vec<A:B> = A::B;
-LL +     let _: Vec<A::B> = A::B;
-   |
+LL |     let _: Vec<A::B> = A::B;
+   |                 ~~
 
 error[E0107]: struct takes at least 1 generic argument but 0 generic arguments were supplied
   --> $DIR/type-ascription-instead-of-path-in-type.rs:6:12
diff --git a/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.stderr b/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.stderr
index 1117ee7efb3..40e16dde6e4 100644
--- a/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.stderr
+++ b/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.stderr
@@ -25,9 +25,8 @@ LL |     for<F> F: 'a,
    |               ^^
 help: consider adding an explicit lifetime bound
    |
-LL -     for<F> F: 'a,
-LL +     for<F> F: 'a, !1_"F": 'a
-   |
+LL |     for<F> F: 'a, !1_"F": 'a
+   |                 ~~~~~~~~~~~~
 
 error[E0309]: the placeholder type `!1_"F"` may not live long enough
   --> $DIR/type-match-with-late-bound.rs:11:1
@@ -40,9 +39,8 @@ LL | {}
    |
 help: consider adding an explicit lifetime bound
    |
-LL -     for<F> F: 'a,
-LL +     for<F> F: 'a, !1_"F": 'a
-   |
+LL |     for<F> F: 'a, !1_"F": 'a
+   |                 ~~~~~~~~~~~~
 
 error[E0309]: the placeholder type `!2_"F"` may not live long enough
   --> $DIR/type-match-with-late-bound.rs:11:1
@@ -55,9 +53,8 @@ LL | {}
    |
 help: consider adding an explicit lifetime bound
    |
-LL -     for<F> F: 'a,
-LL +     for<F> F: 'a, !2_"F": 'a
-   |
+LL |     for<F> F: 'a, !2_"F": 'a
+   |                 ~~~~~~~~~~~~
 
 error: aborting due to 3 previous errors; 1 warning emitted
 
diff --git a/tests/ui/transmutability/assoc-bound.stderr b/tests/ui/transmutability/assoc-bound.stderr
index 4ff67bd636a..b3c7680bf29 100644
--- a/tests/ui/transmutability/assoc-bound.stderr
+++ b/tests/ui/transmutability/assoc-bound.stderr
@@ -12,9 +12,8 @@ LL |     type AssocB: std::mem::TransmuteFrom<()>;
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `B::AssocB`
 help: consider further restricting the associated type
    |
-LL -     T: A,
-LL +     T: A, <T as A>::AssocA: TransmuteFrom<(), Assume { alignment: false, lifetimes: false, safety: false, validity: false }>
-   |
+LL |     T: A, <T as A>::AssocA: TransmuteFrom<(), Assume { alignment: false, lifetimes: false, safety: false, validity: false }>
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0277]: `()` cannot be safely transmuted into `<&i32 as A>::AssocA`
   --> $DIR/assoc-bound.rs:24:19
diff --git a/tests/ui/typeck/issue-29181.stderr b/tests/ui/typeck/issue-29181.stderr
index e73c3e51881..53addf2fe4d 100644
--- a/tests/ui/typeck/issue-29181.stderr
+++ b/tests/ui/typeck/issue-29181.stderr
@@ -12,9 +12,8 @@ LL |     let _ = |x: f64| x * 2.0.exp();
    |
 help: you must specify a concrete type for this numeric value, like `f32`
    |
-LL -     let _ = |x: f64| x * 2.0.exp();
-LL +     let _ = |x: f64| x * 2.0_f32.exp();
-   |
+LL |     let _ = |x: f64| x * 2.0_f32.exp();
+   |                          ~~~~~~~
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/typeck/method-chain-gats.stderr b/tests/ui/typeck/method-chain-gats.stderr
index 902255a28a6..63383792214 100644
--- a/tests/ui/typeck/method-chain-gats.stderr
+++ b/tests/ui/typeck/method-chain-gats.stderr
@@ -19,9 +19,8 @@ LL |         Self::Base<B>: Functor<B>;
    |                        ^^^^^^^^^^ required by this bound in `Functor::fmap`
 help: consider further restricting the associated type
    |
-LL -     T::Base<B>: Functor<B, Base<C> = T::Base<C>>,
-LL +     T::Base<B>: Functor<B, Base<C> = T::Base<C>>, <T as Base>::Base<C>: Functor<C>
-   |
+LL |     T::Base<B>: Functor<B, Base<C> = T::Base<C>>, <T as Base>::Base<C>: Functor<C>
+   |                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 1 previous error