about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorJason Newcomb <jsnewcomb@pm.me>2025-02-05 09:28:35 -0500
committerJason Newcomb <jsnewcomb@pm.me>2025-02-05 10:36:32 -0500
commit4718cb40ecd5e68ae7c5d056d48c60b5e9c1d1ef (patch)
tree08259abf2023a82cc024df802c68df54fb276426 /tests
parent820bfffc25fee9866aa8176529091e04b8824f09 (diff)
downloadrust-4718cb40ecd5e68ae7c5d056d48c60b5e9c1d1ef.tar.gz
rust-4718cb40ecd5e68ae7c5d056d48c60b5e9c1d1ef.zip
When displaying a parameter mismatch error, only highlight the mismatched parameters when showing the definition.
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/argument-suggestions/basic.stderr4
-rw-r--r--tests/ui/argument-suggestions/complex.stderr2
-rw-r--r--tests/ui/argument-suggestions/extra_arguments.stderr34
-rw-r--r--tests/ui/argument-suggestions/invalid_arguments.stderr12
-rw-r--r--tests/ui/argument-suggestions/issue-100478.stderr8
-rw-r--r--tests/ui/argument-suggestions/issue-101097.stderr56
-rw-r--r--tests/ui/argument-suggestions/issue-109425.stderr12
-rw-r--r--tests/ui/argument-suggestions/issue-109831.stderr2
-rw-r--r--tests/ui/argument-suggestions/issue-96638.stderr2
-rw-r--r--tests/ui/argument-suggestions/issue-97197.stderr2
-rw-r--r--tests/ui/argument-suggestions/issue-97484.stderr2
-rw-r--r--tests/ui/argument-suggestions/missing_arguments.stderr26
-rw-r--r--tests/ui/argument-suggestions/mixed_cases.stderr12
-rw-r--r--tests/ui/argument-suggestions/permuted_arguments.stderr4
-rw-r--r--tests/ui/argument-suggestions/suggest-better-removing-issue-126246.stderr12
-rw-r--r--tests/ui/argument-suggestions/swapped_arguments.stderr10
-rw-r--r--tests/ui/error-codes/E0061.stderr2
-rw-r--r--tests/ui/issues/issue-4935.stderr2
-rw-r--r--tests/ui/methods/method-call-err-msg.stderr2
-rw-r--r--tests/ui/mismatched_types/generic-mismatch-reporting-issue-116615.stderr10
-rw-r--r--tests/ui/not-enough-arguments.stderr9
-rw-r--r--tests/ui/span/issue-34264.stderr4
-rw-r--r--tests/ui/span/missing-unit-argument.stderr2
-rw-r--r--tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.stderr2
-rw-r--r--tests/ui/type/type-check/point-at-inference-4.rs1
-rw-r--r--tests/ui/type/type-check/point-at-inference-4.stderr6
-rw-r--r--tests/ui/typeck/remove-extra-argument.stderr2
27 files changed, 91 insertions, 151 deletions
diff --git a/tests/ui/argument-suggestions/basic.stderr b/tests/ui/argument-suggestions/basic.stderr
index 2d52df21233..83f0f630fe8 100644
--- a/tests/ui/argument-suggestions/basic.stderr
+++ b/tests/ui/argument-suggestions/basic.stderr
@@ -57,7 +57,7 @@ note: function defined here
   --> $DIR/basic.rs:16:4
    |
 LL | fn swapped(_i: u32, _s: &str) {}
-   |    ^^^^^^^ -------  --------
+   |    ^^^^^^^
 help: swap these arguments
    |
 LL |     swapped(1, "");
@@ -76,7 +76,7 @@ note: function defined here
   --> $DIR/basic.rs:17:4
    |
 LL | fn permuted(_x: X, _y: Y, _z: Z) {}
-   |    ^^^^^^^^ -----  -----  -----
+   |    ^^^^^^^^
 help: reorder these arguments
    |
 LL |     permuted(X {}, Y {}, Z {});
diff --git a/tests/ui/argument-suggestions/complex.stderr b/tests/ui/argument-suggestions/complex.stderr
index bb3817421df..20c7c2fd7a5 100644
--- a/tests/ui/argument-suggestions/complex.stderr
+++ b/tests/ui/argument-suggestions/complex.stderr
@@ -8,7 +8,7 @@ note: function defined here
   --> $DIR/complex.rs:11:4
    |
 LL | fn complex(_i: u32, _s: &str, _e: E, _f: F, _g: G, _x: X, _y: Y, _z: Z ) {}
-   |    ^^^^^^^ -------  --------  -----  -----  -----  -----  -----  -----
+   |    ^^^^^^^ -------            -----
 help: did you mean
    |
 LL |   complex(/* u32 */, &"", /* E */, F::X2, G{}, X {}, Y {}, Z {});
diff --git a/tests/ui/argument-suggestions/extra_arguments.stderr b/tests/ui/argument-suggestions/extra_arguments.stderr
index 8c95cc86a27..5ed42a9ddd2 100644
--- a/tests/ui/argument-suggestions/extra_arguments.stderr
+++ b/tests/ui/argument-suggestions/extra_arguments.stderr
@@ -44,7 +44,7 @@ note: function defined here
   --> $DIR/extra_arguments.rs:2:4
    |
 LL | fn one_arg<T>(_a: T) {}
-   |    ^^^^^^^    -----
+   |    ^^^^^^^
 help: remove the extra argument
    |
 LL -   one_arg(1, 1);
@@ -61,7 +61,7 @@ note: function defined here
   --> $DIR/extra_arguments.rs:2:4
    |
 LL | fn one_arg<T>(_a: T) {}
-   |    ^^^^^^^    -----
+   |    ^^^^^^^
 help: remove the extra argument
    |
 LL -   one_arg(1, "");
@@ -80,7 +80,7 @@ note: function defined here
   --> $DIR/extra_arguments.rs:2:4
    |
 LL | fn one_arg<T>(_a: T) {}
-   |    ^^^^^^^    -----
+   |    ^^^^^^^
 help: remove the extra arguments
    |
 LL -   one_arg(1, "", 1.0);
@@ -97,7 +97,7 @@ note: function defined here
   --> $DIR/extra_arguments.rs:3:4
    |
 LL | fn two_arg_same(_a: i32, _b: i32) {}
-   |    ^^^^^^^^^^^^ -------  -------
+   |    ^^^^^^^^^^^^
 help: remove the extra argument
    |
 LL -   two_arg_same(1, 1, 1);
@@ -114,7 +114,7 @@ note: function defined here
   --> $DIR/extra_arguments.rs:3:4
    |
 LL | fn two_arg_same(_a: i32, _b: i32) {}
-   |    ^^^^^^^^^^^^ -------  -------
+   |    ^^^^^^^^^^^^
 help: remove the extra argument
    |
 LL -   two_arg_same(1, 1, 1.0);
@@ -131,7 +131,7 @@ note: function defined here
   --> $DIR/extra_arguments.rs:4:4
    |
 LL | fn two_arg_diff(_a: i32, _b: &str) {}
-   |    ^^^^^^^^^^^^ -------  --------
+   |    ^^^^^^^^^^^^
 help: remove the extra argument
    |
 LL -   two_arg_diff(1, 1, "");
@@ -148,7 +148,7 @@ note: function defined here
   --> $DIR/extra_arguments.rs:4:4
    |
 LL | fn two_arg_diff(_a: i32, _b: &str) {}
-   |    ^^^^^^^^^^^^ -------  --------
+   |    ^^^^^^^^^^^^
 help: remove the extra argument
    |
 LL -   two_arg_diff(1, "", "");
@@ -167,7 +167,7 @@ note: function defined here
   --> $DIR/extra_arguments.rs:4:4
    |
 LL | fn two_arg_diff(_a: i32, _b: &str) {}
-   |    ^^^^^^^^^^^^ -------  --------
+   |    ^^^^^^^^^^^^
 help: remove the extra arguments
    |
 LL -   two_arg_diff(1, 1, "", "");
@@ -186,7 +186,7 @@ note: function defined here
   --> $DIR/extra_arguments.rs:4:4
    |
 LL | fn two_arg_diff(_a: i32, _b: &str) {}
-   |    ^^^^^^^^^^^^ -------  --------
+   |    ^^^^^^^^^^^^
 help: remove the extra arguments
    |
 LL -   two_arg_diff(1, "", 1, "");
@@ -203,7 +203,7 @@ note: function defined here
   --> $DIR/extra_arguments.rs:3:4
    |
 LL | fn two_arg_same(_a: i32, _b: i32) {}
-   |    ^^^^^^^^^^^^ -------  -------
+   |    ^^^^^^^^^^^^
 help: remove the extra argument
    |
 LL -   two_arg_same(1, 1,     "");
@@ -220,7 +220,7 @@ note: function defined here
   --> $DIR/extra_arguments.rs:4:4
    |
 LL | fn two_arg_diff(_a: i32, _b: &str) {}
-   |    ^^^^^^^^^^^^ -------  --------
+   |    ^^^^^^^^^^^^
 help: remove the extra argument
    |
 LL -   two_arg_diff(1, 1,     "");
@@ -240,7 +240,7 @@ note: function defined here
   --> $DIR/extra_arguments.rs:3:4
    |
 LL | fn two_arg_same(_a: i32, _b: i32) {}
-   |    ^^^^^^^^^^^^ -------  -------
+   |    ^^^^^^^^^^^^
 help: remove the extra argument
    |
 LL -     1,
@@ -261,7 +261,7 @@ note: function defined here
   --> $DIR/extra_arguments.rs:4:4
    |
 LL | fn two_arg_diff(_a: i32, _b: &str) {}
-   |    ^^^^^^^^^^^^ -------  --------
+   |    ^^^^^^^^^^^^
 help: remove the extra argument
    |
 LL -     1,
@@ -335,7 +335,7 @@ note: function defined here
   --> $DIR/extra_arguments.rs:2:4
    |
 LL | fn one_arg<T>(_a: T) {}
-   |    ^^^^^^^    -----
+   |    ^^^^^^^
 help: remove the extra argument
    |
 LL -   one_arg(1, panic!());
@@ -352,7 +352,7 @@ note: function defined here
   --> $DIR/extra_arguments.rs:2:4
    |
 LL | fn one_arg<T>(_a: T) {}
-   |    ^^^^^^^    -----
+   |    ^^^^^^^
 help: remove the extra argument
    |
 LL -   one_arg(panic!(), 1);
@@ -369,7 +369,7 @@ note: function defined here
   --> $DIR/extra_arguments.rs:2:4
    |
 LL | fn one_arg<T>(_a: T) {}
-   |    ^^^^^^^    -----
+   |    ^^^^^^^
 help: remove the extra argument
    |
 LL -   one_arg(stringify!($e), 1);
@@ -386,7 +386,7 @@ note: function defined here
   --> $DIR/extra_arguments.rs:2:4
    |
 LL | fn one_arg<T>(_a: T) {}
-   |    ^^^^^^^    -----
+   |    ^^^^^^^
 help: remove the extra argument
    |
 LL -   one_arg(for _ in 1.. {}, 1);
diff --git a/tests/ui/argument-suggestions/invalid_arguments.stderr b/tests/ui/argument-suggestions/invalid_arguments.stderr
index d26f33d098b..a50058149b8 100644
--- a/tests/ui/argument-suggestions/invalid_arguments.stderr
+++ b/tests/ui/argument-suggestions/invalid_arguments.stderr
@@ -150,7 +150,7 @@ note: function defined here
   --> $DIR/invalid_arguments.rs:8:4
    |
 LL | fn three_arg_diff(_a: i32, _b: f32, _c: &str) {}
-   |    ^^^^^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^^^^^ -------  -------
 
 error[E0308]: arguments to this function are incorrect
   --> $DIR/invalid_arguments.rs:29:3
@@ -164,7 +164,7 @@ note: function defined here
   --> $DIR/invalid_arguments.rs:8:4
    |
 LL | fn three_arg_diff(_a: i32, _b: f32, _c: &str) {}
-   |    ^^^^^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^^^^^ -------           --------
 
 error[E0308]: arguments to this function are incorrect
   --> $DIR/invalid_arguments.rs:30:3
@@ -178,7 +178,7 @@ note: function defined here
   --> $DIR/invalid_arguments.rs:8:4
    |
 LL | fn three_arg_diff(_a: i32, _b: f32, _c: &str) {}
-   |    ^^^^^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^^^^^          -------  --------
 
 error[E0308]: arguments to this function are incorrect
   --> $DIR/invalid_arguments.rs:32:3
@@ -249,7 +249,7 @@ note: function defined here
   --> $DIR/invalid_arguments.rs:9:4
    |
 LL | fn three_arg_repeat(_a: i32, _b: i32, _c: &str) {}
-   |    ^^^^^^^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^^^^^^^ -------  -------
 
 error[E0308]: arguments to this function are incorrect
   --> $DIR/invalid_arguments.rs:39:3
@@ -263,7 +263,7 @@ note: function defined here
   --> $DIR/invalid_arguments.rs:9:4
    |
 LL | fn three_arg_repeat(_a: i32, _b: i32, _c: &str) {}
-   |    ^^^^^^^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^^^^^^^ -------           --------
 
 error[E0308]: arguments to this function are incorrect
   --> $DIR/invalid_arguments.rs:40:3
@@ -277,7 +277,7 @@ note: function defined here
   --> $DIR/invalid_arguments.rs:9:4
    |
 LL | fn three_arg_repeat(_a: i32, _b: i32, _c: &str) {}
-   |    ^^^^^^^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^^^^^^^          -------  --------
 
 error[E0308]: arguments to this function are incorrect
   --> $DIR/invalid_arguments.rs:42:3
diff --git a/tests/ui/argument-suggestions/issue-100478.stderr b/tests/ui/argument-suggestions/issue-100478.stderr
index 94709f0ebc6..6299571d998 100644
--- a/tests/ui/argument-suggestions/issue-100478.stderr
+++ b/tests/ui/argument-suggestions/issue-100478.stderr
@@ -11,7 +11,7 @@ note: function defined here
   --> $DIR/issue-100478.rs:30:4
    |
 LL | fn three_diff(_a: T1, _b: T2, _c: T3) {}
-   |    ^^^^^^^^^^ ------  ------  ------
+   |    ^^^^^^^^^^ ------          ------
 help: provide the arguments
    |
 LL |     three_diff(/* T1 */, T2::new(0), /* T3 */);
@@ -31,7 +31,7 @@ note: function defined here
   --> $DIR/issue-100478.rs:31:4
    |
 LL | fn four_shuffle(_a: T1, _b: T2, _c: T3, _d: T4) {}
-   |    ^^^^^^^^^^^^ ------  ------  ------  ------
+   |    ^^^^^^^^^^^^
 help: did you mean
    |
 LL |     four_shuffle(T1::default(), T2::default(), T3::default(), T4::default());
@@ -50,7 +50,7 @@ note: function defined here
   --> $DIR/issue-100478.rs:31:4
    |
 LL | fn four_shuffle(_a: T1, _b: T2, _c: T3, _d: T4) {}
-   |    ^^^^^^^^^^^^ ------  ------  ------  ------
+   |    ^^^^^^^^^^^^                         ------
 help: swap these arguments
    |
 LL |     four_shuffle(T1::default(), T2::default(), T3::default(), /* T4 */);
@@ -69,7 +69,7 @@ note: function defined here
   --> $DIR/issue-100478.rs:29:4
    |
 LL | fn foo(p1: T1, p2: Arc<T2>, p3: T3, p4: Arc<T4>, p5: T5, p6: T6, p7: T7, p8: Arc<T8>) {}
-   |    ^^^ ------  -----------  ------  -----------  ------  ------  ------  -----------
+   |    ^^^         -----------
 help: provide the argument
    |
 LL |     foo(p1, /* Arc<T2> */, p3, p4, p5, p6, p7, p8);
diff --git a/tests/ui/argument-suggestions/issue-101097.stderr b/tests/ui/argument-suggestions/issue-101097.stderr
index 6e21f19ab4f..45aa2dba5d5 100644
--- a/tests/ui/argument-suggestions/issue-101097.stderr
+++ b/tests/ui/argument-suggestions/issue-101097.stderr
@@ -13,18 +13,6 @@ note: function defined here
    |
 LL | fn f(
    |    ^
-LL |     a1: A,
-   |     -----
-LL |     a2: A,
-   |     -----
-LL |     b1: B,
-   |     -----
-LL |     b2: B,
-   |     -----
-LL |     c1: C,
-   |     -----
-LL |     c2: C,
-   |     -----
 help: did you mean
    |
 LL |     f(A, A, B, B, C, C);
@@ -41,18 +29,6 @@ note: function defined here
    |
 LL | fn f(
    |    ^
-LL |     a1: A,
-   |     -----
-LL |     a2: A,
-   |     -----
-LL |     b1: B,
-   |     -----
-LL |     b2: B,
-   |     -----
-LL |     c1: C,
-   |     -----
-LL |     c2: C,
-   |     -----
 help: did you mean
    |
 LL |     f(A, A, B, B, C, C);
@@ -72,14 +48,7 @@ note: function defined here
    |
 LL | fn f(
    |    ^
-LL |     a1: A,
-   |     -----
-LL |     a2: A,
-   |     -----
-LL |     b1: B,
-   |     -----
-LL |     b2: B,
-   |     -----
+...
 LL |     c1: C,
    |     -----
 LL |     c2: C,
@@ -104,18 +73,6 @@ note: function defined here
    |
 LL | fn f(
    |    ^
-LL |     a1: A,
-   |     -----
-LL |     a2: A,
-   |     -----
-LL |     b1: B,
-   |     -----
-LL |     b2: B,
-   |     -----
-LL |     c1: C,
-   |     -----
-LL |     c2: C,
-   |     -----
 help: did you mean
    |
 LL |     f(A, A, B, B, C, C);
@@ -137,18 +94,9 @@ note: function defined here
    |
 LL | fn f(
    |    ^
-LL |     a1: A,
-   |     -----
-LL |     a2: A,
-   |     -----
+...
 LL |     b1: B,
    |     -----
-LL |     b2: B,
-   |     -----
-LL |     c1: C,
-   |     -----
-LL |     c2: C,
-   |     -----
 help: did you mean
    |
 LL |     f(A, A, /* B */, B, C, C);
diff --git a/tests/ui/argument-suggestions/issue-109425.stderr b/tests/ui/argument-suggestions/issue-109425.stderr
index 2cd53ed528e..232dc0183c8 100644
--- a/tests/ui/argument-suggestions/issue-109425.stderr
+++ b/tests/ui/argument-suggestions/issue-109425.stderr
@@ -29,7 +29,7 @@ note: function defined here
   --> $DIR/issue-109425.rs:4:4
    |
 LL | fn i(_: u32) {}
-   |    ^ ------
+   |    ^
 help: remove the extra arguments
    |
 LL -     i(0, 1, 2,);     // i(0,)
@@ -48,7 +48,7 @@ note: function defined here
   --> $DIR/issue-109425.rs:4:4
    |
 LL | fn i(_: u32) {}
-   |    ^ ------
+   |    ^
 help: remove the extra arguments
    |
 LL -     i(0, 1, 2);      // i(0)
@@ -67,7 +67,7 @@ note: function defined here
   --> $DIR/issue-109425.rs:5:4
    |
 LL | fn is(_: u32, _: &str) {}
-   |    ^^ ------  -------
+   |    ^^
 help: remove the extra arguments
    |
 LL -     is(0, 1, 2, ""); // is(0, "")
@@ -86,7 +86,7 @@ note: function defined here
   --> $DIR/issue-109425.rs:5:4
    |
 LL | fn is(_: u32, _: &str) {}
-   |    ^^ ------  -------
+   |    ^^
 help: remove the extra arguments
    |
 LL -     is((), 1, "", ());
@@ -105,7 +105,7 @@ note: function defined here
   --> $DIR/issue-109425.rs:5:4
    |
 LL | fn is(_: u32, _: &str) {}
-   |    ^^ ------  -------
+   |    ^^
 help: remove the extra arguments
    |
 LL -     is(1, (), "", ());
@@ -124,7 +124,7 @@ note: function defined here
   --> $DIR/issue-109425.rs:6:4
    |
 LL | fn s(_: &str) {}
-   |    ^ -------
+   |    ^
 help: remove the extra arguments
    |
 LL -     s(0, 1, "");     // s("")
diff --git a/tests/ui/argument-suggestions/issue-109831.stderr b/tests/ui/argument-suggestions/issue-109831.stderr
index 12be0887121..cee87223866 100644
--- a/tests/ui/argument-suggestions/issue-109831.stderr
+++ b/tests/ui/argument-suggestions/issue-109831.stderr
@@ -38,7 +38,7 @@ note: function defined here
   --> $DIR/issue-109831.rs:4:4
    |
 LL | fn f(b1: B, b2: B, a2: C) {}
-   |    ^ -----  -----  -----
+   |    ^ -----  -----
 help: remove the extra argument
    |
 LL -     f(A, A, B, C);
diff --git a/tests/ui/argument-suggestions/issue-96638.stderr b/tests/ui/argument-suggestions/issue-96638.stderr
index 6492acbad94..509b2a157de 100644
--- a/tests/ui/argument-suggestions/issue-96638.stderr
+++ b/tests/ui/argument-suggestions/issue-96638.stderr
@@ -10,7 +10,7 @@ note: function defined here
   --> $DIR/issue-96638.rs:1:4
    |
 LL | fn f(_: usize, _: &usize, _: usize) {}
-   |    ^ --------  ---------  --------
+   |    ^ --------             --------
 help: provide the argument
    |
 LL |     f(/* usize */, &x, /* usize */);
diff --git a/tests/ui/argument-suggestions/issue-97197.stderr b/tests/ui/argument-suggestions/issue-97197.stderr
index 3768367a5e6..1cf19fc1bc8 100644
--- a/tests/ui/argument-suggestions/issue-97197.stderr
+++ b/tests/ui/argument-suggestions/issue-97197.stderr
@@ -8,7 +8,7 @@ note: function defined here
   --> $DIR/issue-97197.rs:6:8
    |
 LL | pub fn g(a1: (), a2: bool, a3: bool, a4: bool, a5: bool, a6: ()) -> () {}
-   |        ^ ------  --------  --------  --------  --------  ------
+   |        ^         --------  --------  --------  --------
 help: provide the arguments
    |
 LL |     g((), /* bool */, /* bool */, /* bool */, /* bool */, ());
diff --git a/tests/ui/argument-suggestions/issue-97484.stderr b/tests/ui/argument-suggestions/issue-97484.stderr
index a7708f6e0d7..e09d1928f74 100644
--- a/tests/ui/argument-suggestions/issue-97484.stderr
+++ b/tests/ui/argument-suggestions/issue-97484.stderr
@@ -12,7 +12,7 @@ note: function defined here
   --> $DIR/issue-97484.rs:9:4
    |
 LL | fn foo(a: &A, d: D, e: &E, g: G) {}
-   |    ^^^ -----  ----  -----  ----
+   |    ^^^              -----
 help: consider borrowing here
    |
 LL |     foo(&&A, B, C, D, &E, F, G);
diff --git a/tests/ui/argument-suggestions/missing_arguments.stderr b/tests/ui/argument-suggestions/missing_arguments.stderr
index 3a27a51d032..fc219b9ce2c 100644
--- a/tests/ui/argument-suggestions/missing_arguments.stderr
+++ b/tests/ui/argument-suggestions/missing_arguments.stderr
@@ -40,7 +40,7 @@ note: function defined here
   --> $DIR/missing_arguments.rs:2:4
    |
 LL | fn two_same(_a: i32, _b: i32) {}
-   |    ^^^^^^^^ -------  -------
+   |    ^^^^^^^^          -------
 help: provide the argument
    |
 LL |   two_same(1, /* i32 */);
@@ -72,7 +72,7 @@ note: function defined here
   --> $DIR/missing_arguments.rs:3:4
    |
 LL | fn two_diff(_a: i32, _b: f32) {}
-   |    ^^^^^^^^ -------  -------
+   |    ^^^^^^^^          -------
 help: provide the argument
    |
 LL |   two_diff(1, /* f32 */);
@@ -88,7 +88,7 @@ note: function defined here
   --> $DIR/missing_arguments.rs:3:4
    |
 LL | fn two_diff(_a: i32, _b: f32) {}
-   |    ^^^^^^^^ -------  -------
+   |    ^^^^^^^^ -------
 help: provide the argument
    |
 LL |   two_diff(/* i32 */, 1.0);
@@ -120,7 +120,7 @@ note: function defined here
   --> $DIR/missing_arguments.rs:4:4
    |
 LL | fn three_same(_a: i32, _b: i32, _c: i32) {}
-   |    ^^^^^^^^^^ -------  -------  -------
+   |    ^^^^^^^^^^          -------  -------
 help: provide the arguments
    |
 LL |   three_same(1, /* i32 */, /* i32 */);
@@ -136,7 +136,7 @@ note: function defined here
   --> $DIR/missing_arguments.rs:4:4
    |
 LL | fn three_same(_a: i32, _b: i32, _c: i32) {}
-   |    ^^^^^^^^^^ -------  -------  -------
+   |    ^^^^^^^^^^                   -------
 help: provide the argument
    |
 LL |   three_same(1, 1, /* i32 */);
@@ -152,7 +152,7 @@ note: function defined here
   --> $DIR/missing_arguments.rs:5:4
    |
 LL | fn three_diff(_a: i32, _b: f32, _c: &str) {}
-   |    ^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^ -------
 help: provide the argument
    |
 LL |   three_diff(/* i32 */, 1.0, "");
@@ -168,7 +168,7 @@ note: function defined here
   --> $DIR/missing_arguments.rs:5:4
    |
 LL | fn three_diff(_a: i32, _b: f32, _c: &str) {}
-   |    ^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^          -------
 help: provide the argument
    |
 LL |   three_diff(1, /* f32 */, "");
@@ -184,7 +184,7 @@ note: function defined here
   --> $DIR/missing_arguments.rs:5:4
    |
 LL | fn three_diff(_a: i32, _b: f32, _c: &str) {}
-   |    ^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^                   --------
 help: provide the argument
    |
 LL |   three_diff(1, 1.0, /* &str */);
@@ -200,7 +200,7 @@ note: function defined here
   --> $DIR/missing_arguments.rs:5:4
    |
 LL | fn three_diff(_a: i32, _b: f32, _c: &str) {}
-   |    ^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^ -------  -------
 help: provide the arguments
    |
 LL |   three_diff(/* i32 */, /* f32 */, "");
@@ -219,7 +219,7 @@ note: function defined here
   --> $DIR/missing_arguments.rs:5:4
    |
 LL | fn three_diff(_a: i32, _b: f32, _c: &str) {}
-   |    ^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^ -------           --------
 help: provide the arguments
    |
 LL |   three_diff(/* i32 */, 1.0, /* &str */);
@@ -235,7 +235,7 @@ note: function defined here
   --> $DIR/missing_arguments.rs:5:4
    |
 LL | fn three_diff(_a: i32, _b: f32, _c: &str) {}
-   |    ^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^          -------  --------
 help: provide the arguments
    |
 LL |   three_diff(1, /* f32 */, /* &str */);
@@ -267,7 +267,7 @@ note: function defined here
   --> $DIR/missing_arguments.rs:6:4
    |
 LL | fn four_repeated(_a: i32, _b: f32, _c: f32, _d: &str) {}
-   |    ^^^^^^^^^^^^^ -------  -------  -------  --------
+   |    ^^^^^^^^^^^^^          -------  -------
 help: provide the arguments
    |
 LL |   four_repeated(1, /* f32 */, /* f32 */, "");
@@ -299,7 +299,7 @@ note: function defined here
   --> $DIR/missing_arguments.rs:7:4
    |
 LL | fn complex(_a: i32, _b: f32, _c: i32, _d: f32, _e: &str) {}
-   |    ^^^^^^^ -------  -------  -------  -------  --------
+   |    ^^^^^^^          -------  -------  -------
 help: provide the arguments
    |
 LL |   complex(1, /* f32 */, /* i32 */, /* f32 */, "");
diff --git a/tests/ui/argument-suggestions/mixed_cases.stderr b/tests/ui/argument-suggestions/mixed_cases.stderr
index bec5d4dc16b..c19cd68c771 100644
--- a/tests/ui/argument-suggestions/mixed_cases.stderr
+++ b/tests/ui/argument-suggestions/mixed_cases.stderr
@@ -10,7 +10,7 @@ note: function defined here
   --> $DIR/mixed_cases.rs:5:4
    |
 LL | fn two_args(_a: i32, _b: f32) {}
-   |    ^^^^^^^^ -------  -------
+   |    ^^^^^^^^          -------
 help: remove the extra argument
    |
 LL -   two_args(1, "", X {});
@@ -30,7 +30,7 @@ note: function defined here
   --> $DIR/mixed_cases.rs:6:4
    |
 LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
-   |    ^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^          -------
 help: did you mean
    |
 LL |   three_args(1, /* f32 */, "");
@@ -49,7 +49,7 @@ note: function defined here
   --> $DIR/mixed_cases.rs:6:4
    |
 LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
-   |    ^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^          -------  --------
 help: provide the argument
    |
 LL |   three_args(1, /* f32 */, /* &str */);
@@ -67,7 +67,7 @@ note: function defined here
   --> $DIR/mixed_cases.rs:6:4
    |
 LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
-   |    ^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^          -------
 help: did you mean
    |
 LL |   three_args(1, /* f32 */, "");
@@ -86,7 +86,7 @@ note: function defined here
   --> $DIR/mixed_cases.rs:6:4
    |
 LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
-   |    ^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^          -------
 help: swap these arguments
    |
 LL |   three_args(1, /* f32 */, "");
@@ -106,7 +106,7 @@ note: function defined here
   --> $DIR/mixed_cases.rs:6:4
    |
 LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
-   |    ^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^          -------
 help: did you mean
    |
 LL |   three_args(1, /* f32 */, "");
diff --git a/tests/ui/argument-suggestions/permuted_arguments.stderr b/tests/ui/argument-suggestions/permuted_arguments.stderr
index 655807a7f38..f6bec520984 100644
--- a/tests/ui/argument-suggestions/permuted_arguments.stderr
+++ b/tests/ui/argument-suggestions/permuted_arguments.stderr
@@ -11,7 +11,7 @@ note: function defined here
   --> $DIR/permuted_arguments.rs:5:4
    |
 LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
-   |    ^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^
 help: reorder these arguments
    |
 LL |   three_args(1, 1.0, "");
@@ -32,7 +32,7 @@ note: function defined here
   --> $DIR/permuted_arguments.rs:6:4
    |
 LL | fn many_args(_a: i32, _b: f32, _c: &str, _d: X, _e: Y) {}
-   |    ^^^^^^^^^ -------  -------  --------  -----  -----
+   |    ^^^^^^^^^
 help: reorder these arguments
    |
 LL |   many_args(1, 1.0, "", X {}, Y {});
diff --git a/tests/ui/argument-suggestions/suggest-better-removing-issue-126246.stderr b/tests/ui/argument-suggestions/suggest-better-removing-issue-126246.stderr
index 730f20cfb88..48c647764df 100644
--- a/tests/ui/argument-suggestions/suggest-better-removing-issue-126246.stderr
+++ b/tests/ui/argument-suggestions/suggest-better-removing-issue-126246.stderr
@@ -38,7 +38,7 @@ note: function defined here
   --> $DIR/suggest-better-removing-issue-126246.rs:1:4
    |
 LL | fn add_one(x: i32) -> i32 {
-   |    ^^^^^^^ ------
+   |    ^^^^^^^
 help: remove the extra argument
    |
 LL -     add_one(2, 2);
@@ -55,7 +55,7 @@ note: function defined here
   --> $DIR/suggest-better-removing-issue-126246.rs:1:4
    |
 LL | fn add_one(x: i32) -> i32 {
-   |    ^^^^^^^ ------
+   |    ^^^^^^^
 help: remove the extra argument
    |
 LL -     add_one(no_such_local, 10);
@@ -72,7 +72,7 @@ note: function defined here
   --> $DIR/suggest-better-removing-issue-126246.rs:1:4
    |
 LL | fn add_one(x: i32) -> i32 {
-   |    ^^^^^^^ ------
+   |    ^^^^^^^
 help: remove the extra argument
    |
 LL -     add_one(10, no_such_local);
@@ -89,7 +89,7 @@ note: function defined here
   --> $DIR/suggest-better-removing-issue-126246.rs:5:4
    |
 LL | fn add_two(x: i32, y: i32) -> i32 {
-   |    ^^^^^^^ ------  ------
+   |    ^^^^^^^
 help: remove the extra argument
    |
 LL -     add_two(10, no_such_local, 10);
@@ -106,7 +106,7 @@ note: function defined here
   --> $DIR/suggest-better-removing-issue-126246.rs:5:4
    |
 LL | fn add_two(x: i32, y: i32) -> i32 {
-   |    ^^^^^^^ ------  ------
+   |    ^^^^^^^
 help: remove the extra argument
    |
 LL -     add_two(no_such_local, 10, 10);
@@ -123,7 +123,7 @@ note: function defined here
   --> $DIR/suggest-better-removing-issue-126246.rs:5:4
    |
 LL | fn add_two(x: i32, y: i32) -> i32 {
-   |    ^^^^^^^ ------  ------
+   |    ^^^^^^^
 help: remove the extra argument
    |
 LL -     add_two(10, 10, no_such_local);
diff --git a/tests/ui/argument-suggestions/swapped_arguments.stderr b/tests/ui/argument-suggestions/swapped_arguments.stderr
index dabf5e952b2..22db77b3b93 100644
--- a/tests/ui/argument-suggestions/swapped_arguments.stderr
+++ b/tests/ui/argument-suggestions/swapped_arguments.stderr
@@ -10,7 +10,7 @@ note: function defined here
   --> $DIR/swapped_arguments.rs:3:4
    |
 LL | fn two_args(_a: i32, _b: f32) {}
-   |    ^^^^^^^^ -------  -------
+   |    ^^^^^^^^
 help: swap these arguments
    |
 LL |   two_args(1, 1.0);
@@ -28,7 +28,7 @@ note: function defined here
   --> $DIR/swapped_arguments.rs:4:4
    |
 LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
-   |    ^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^
 help: swap these arguments
    |
 LL |   three_args(1, 1.0, "");
@@ -46,7 +46,7 @@ note: function defined here
   --> $DIR/swapped_arguments.rs:4:4
    |
 LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
-   |    ^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^
 help: swap these arguments
    |
 LL |   three_args(1, 1.0, "");
@@ -64,7 +64,7 @@ note: function defined here
   --> $DIR/swapped_arguments.rs:4:4
    |
 LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
-   |    ^^^^^^^^^^ -------  -------  --------
+   |    ^^^^^^^^^^
 help: swap these arguments
    |
 LL |   three_args(1, 1.0, "");
@@ -84,7 +84,7 @@ note: function defined here
   --> $DIR/swapped_arguments.rs:5:4
    |
 LL | fn four_args(_a: i32, _b: f32, _c: &str, _d: X) {}
-   |    ^^^^^^^^^ -------  -------  --------  -----
+   |    ^^^^^^^^^
 help: did you mean
    |
 LL |   four_args(1, 1.0, "", X {});
diff --git a/tests/ui/error-codes/E0061.stderr b/tests/ui/error-codes/E0061.stderr
index 7b180c07120..4a420cd118a 100644
--- a/tests/ui/error-codes/E0061.stderr
+++ b/tests/ui/error-codes/E0061.stderr
@@ -8,7 +8,7 @@ note: function defined here
   --> $DIR/E0061.rs:1:4
    |
 LL | fn f(a: u16, b: &str) {}
-   |    ^ ------  -------
+   |    ^         -------
 help: provide the argument
    |
 LL |     f(0, /* &str */);
diff --git a/tests/ui/issues/issue-4935.stderr b/tests/ui/issues/issue-4935.stderr
index 7ee895d91c7..918f74256c0 100644
--- a/tests/ui/issues/issue-4935.stderr
+++ b/tests/ui/issues/issue-4935.stderr
@@ -8,7 +8,7 @@ note: function defined here
   --> $DIR/issue-4935.rs:3:4
    |
 LL | fn foo(a: usize) {}
-   |    ^^^ --------
+   |    ^^^
 help: remove the extra argument
    |
 LL - fn main() { foo(5, 6) }
diff --git a/tests/ui/methods/method-call-err-msg.stderr b/tests/ui/methods/method-call-err-msg.stderr
index 84005119a87..c17c4a23a3a 100644
--- a/tests/ui/methods/method-call-err-msg.stderr
+++ b/tests/ui/methods/method-call-err-msg.stderr
@@ -41,7 +41,7 @@ note: method defined here
   --> $DIR/method-call-err-msg.rs:7:8
    |
 LL |     fn two(self, _: isize, _: isize) -> Foo { self }
-   |        ^^^       --------  --------
+   |        ^^^                 --------
 help: provide the argument
    |
 LL |      .two(0, /* isize */);
diff --git a/tests/ui/mismatched_types/generic-mismatch-reporting-issue-116615.stderr b/tests/ui/mismatched_types/generic-mismatch-reporting-issue-116615.stderr
index 0a86f884e70..9fc3a914447 100644
--- a/tests/ui/mismatched_types/generic-mismatch-reporting-issue-116615.stderr
+++ b/tests/ui/mismatched_types/generic-mismatch-reporting-issue-116615.stderr
@@ -31,9 +31,8 @@ note: function defined here
   --> $DIR/generic-mismatch-reporting-issue-116615.rs:2:4
    |
 LL | fn foo_multi_same<T>(a: T, b: T, c: T, d: T, e: T, f: i32) {}
-   |    ^^^^^^^^^^^^^^ -  ----  ----  ----  ----  ----  ------
-   |                   |  |     |     |     |     |
-   |                   |  |     |     |     |     this parameter needs to match the `&str` type of `a` and `b`
+   |    ^^^^^^^^^^^^^^ -  ----  ----  ----  ----  ---- this parameter needs to match the `&str` type of `a` and `b`
+   |                   |  |     |     |     |
    |                   |  |     |     |     this parameter needs to match the `&str` type of `a` and `b`
    |                   |  |     |     this parameter needs to match the `&str` type of `a` and `b`
    |                   |  |     `c`, `d` and `e` need to match the `&str` type of this parameter
@@ -83,9 +82,8 @@ note: function defined here
   --> $DIR/generic-mismatch-reporting-issue-116615.rs:2:4
    |
 LL | fn foo_multi_same<T>(a: T, b: T, c: T, d: T, e: T, f: i32) {}
-   |    ^^^^^^^^^^^^^^ -  ----  ----  ----  ----  ----  ------
-   |                   |  |     |     |     |     |
-   |                   |  |     |     |     |     `b` and `c` need to match the `&str` type of this parameter
+   |    ^^^^^^^^^^^^^^ -  ----  ----  ----  ----  ---- `b` and `c` need to match the `&str` type of this parameter
+   |                   |  |     |     |     |
    |                   |  |     |     |     `b` and `c` need to match the `&str` type of this parameter
    |                   |  |     |     this parameter needs to match the `&str` type of `a`, `d` and `e`
    |                   |  |     this parameter needs to match the `&str` type of `a`, `d` and `e`
diff --git a/tests/ui/not-enough-arguments.stderr b/tests/ui/not-enough-arguments.stderr
index 89e98866667..66c96ba43c8 100644
--- a/tests/ui/not-enough-arguments.stderr
+++ b/tests/ui/not-enough-arguments.stderr
@@ -8,7 +8,7 @@ note: function defined here
   --> $DIR/not-enough-arguments.rs:5:4
    |
 LL | fn foo(a: isize, b: isize, c: isize, d:isize) {
-   |    ^^^ --------  --------  --------  -------
+   |    ^^^                               -------
 help: provide the argument
    |
 LL |   foo(1, 2, 3, /* isize */);
@@ -25,12 +25,7 @@ note: function defined here
    |
 LL | fn bar(
    |    ^^^
-LL |     a: i32,
-   |     ------
-LL |     b: i32,
-   |     ------
-LL |     c: i32,
-   |     ------
+...
 LL |     d: i32,
    |     ------
 LL |     e: i32,
diff --git a/tests/ui/span/issue-34264.stderr b/tests/ui/span/issue-34264.stderr
index b581cdd0be2..c8046a1bddf 100644
--- a/tests/ui/span/issue-34264.stderr
+++ b/tests/ui/span/issue-34264.stderr
@@ -60,7 +60,7 @@ note: function defined here
   --> $DIR/issue-34264.rs:1:4
    |
 LL | fn foo(Option<i32>, String) {}
-   |    ^^^ -----------  ------
+   |    ^^^
 help: remove the extra argument
    |
 LL -     foo(Some(42), 2, "");
@@ -91,7 +91,7 @@ note: function defined here
   --> $DIR/issue-34264.rs:3:4
    |
 LL | fn bar(x, y: usize) {}
-   |    ^^^ -  --------
+   |    ^^^
 help: remove the extra argument
    |
 LL -     bar(1, 2, 3);
diff --git a/tests/ui/span/missing-unit-argument.stderr b/tests/ui/span/missing-unit-argument.stderr
index 79980f48ab6..6261831b752 100644
--- a/tests/ui/span/missing-unit-argument.stderr
+++ b/tests/ui/span/missing-unit-argument.stderr
@@ -37,7 +37,7 @@ note: function defined here
   --> $DIR/missing-unit-argument.rs:1:4
    |
 LL | fn foo(():(), ():()) {}
-   |    ^^^ -----  -----
+   |    ^^^        -----
 help: provide the argument
    |
 LL |     foo((), ());
diff --git a/tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.stderr b/tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.stderr
index 1938b3375a5..9c28f7b0792 100644
--- a/tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.stderr
+++ b/tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.stderr
@@ -10,7 +10,7 @@ note: function defined here
   --> $DIR/coerce-in-may-coerce.rs:12:4
    |
 LL | fn arg_error(x: <fn() as Mirror>::Assoc, y: ()) { todo!() }
-   |    ^^^^^^^^^ --------------------------  -----
+   |    ^^^^^^^^^
 help: swap these arguments
    |
 LL |     arg_error(|| (), ());
diff --git a/tests/ui/type/type-check/point-at-inference-4.rs b/tests/ui/type/type-check/point-at-inference-4.rs
index 5745b738532..258374f299e 100644
--- a/tests/ui/type/type-check/point-at-inference-4.rs
+++ b/tests/ui/type/type-check/point-at-inference-4.rs
@@ -4,7 +4,6 @@ impl<A, B> S<A, B> {
     fn infer(&self, a: A, b: B) {}
     //~^ NOTE method defined here
     //~| NOTE
-    //~| NOTE
 }
 
 fn main() {
diff --git a/tests/ui/type/type-check/point-at-inference-4.stderr b/tests/ui/type/type-check/point-at-inference-4.stderr
index a953ca70ea2..544c25934ec 100644
--- a/tests/ui/type/type-check/point-at-inference-4.stderr
+++ b/tests/ui/type/type-check/point-at-inference-4.stderr
@@ -1,5 +1,5 @@
 error[E0061]: this method takes 2 arguments but 1 argument was supplied
-  --> $DIR/point-at-inference-4.rs:12:7
+  --> $DIR/point-at-inference-4.rs:11:7
    |
 LL |     s.infer(0i32);
    |       ^^^^^------ argument #2 is missing
@@ -8,14 +8,14 @@ note: method defined here
   --> $DIR/point-at-inference-4.rs:4:8
    |
 LL |     fn infer(&self, a: A, b: B) {}
-   |        ^^^^^        ----  ----
+   |        ^^^^^              ----
 help: provide the argument
    |
 LL |     s.infer(0i32, /* b */);
    |            ~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
-  --> $DIR/point-at-inference-4.rs:19:24
+  --> $DIR/point-at-inference-4.rs:18:24
    |
 LL |     s.infer(0i32);
    |     -       ---- this argument has type `i32`...
diff --git a/tests/ui/typeck/remove-extra-argument.stderr b/tests/ui/typeck/remove-extra-argument.stderr
index d4e0dcb50ae..17e1b613cd9 100644
--- a/tests/ui/typeck/remove-extra-argument.stderr
+++ b/tests/ui/typeck/remove-extra-argument.stderr
@@ -8,7 +8,7 @@ note: function defined here
   --> $DIR/remove-extra-argument.rs:3:4
    |
 LL | fn l(_a: Vec<u8>) {}
-   |    ^ -----------
+   |    ^
 help: remove the extra argument
    |
 LL -     l(vec![], vec![])