about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2024-07-05 01:08:44 +0000
committerEsteban Küber <esteban@kuber.com.ar>2024-07-22 22:04:49 +0000
commitc807ac034089e31364baa24e19d5d61cbb657989 (patch)
treed5d0248a8aad7a51fc1a7ab5425520b584f80686
parent2a1c384f0e44ad01ac5c85f0cd9de58c97981974 (diff)
downloadrust-c807ac034089e31364baa24e19d5d61cbb657989.tar.gz
rust-c807ac034089e31364baa24e19d5d61cbb657989.zip
Use verbose suggestion for "wrong # of generics"
-rw-r--r--compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs8
-rw-r--r--tests/rustdoc-ui/invalid_const_in_lifetime_position.stderr27
-rw-r--r--tests/rustdoc-ui/mismatched_arg_count.stderr9
-rw-r--r--tests/ui/argument-suggestions/issue-100154.stderr9
-rw-r--r--tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr18
-rw-r--r--tests/ui/const-generics/adt_const_params/transmutable-ice-110969.stderr10
-rw-r--r--tests/ui/const-generics/generic_arg_infer/infer-arg-test.stderr9
-rw-r--r--tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.stderr9
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-102768.stderr27
-rw-r--r--tests/ui/const-generics/incorrect-number-of-const-args.stderr9
-rw-r--r--tests/ui/const-generics/invalid-const-arg-for-type-param.stderr9
-rw-r--r--tests/ui/const-generics/invalid-constant-in-args.stderr10
-rw-r--r--tests/ui/constructor-lifetime-args.stderr18
-rw-r--r--tests/ui/consts/effect_param.stderr40
-rw-r--r--tests/ui/error-codes/E0107.stderr72
-rw-r--r--tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr27
-rw-r--r--tests/ui/generic-associated-types/parameter_number_and_kind.stderr18
-rw-r--r--tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr27
-rw-r--r--tests/ui/generics/bad-mid-path-type-params.stderr45
-rw-r--r--tests/ui/generics/foreign-generic-mismatch.stderr9
-rw-r--r--tests/ui/generics/generic-arg-mismatch-recover.stderr27
-rw-r--r--tests/ui/generics/generic-impl-more-params-with-defaults.stderr9
-rw-r--r--tests/ui/generics/generic-type-more-params-with-defaults.stderr9
-rw-r--r--tests/ui/generics/wrong-number-of-args.stderr256
-rw-r--r--tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr9
-rw-r--r--tests/ui/impl-trait/in-trait/opaque-and-lifetime-mismatch.stderr27
-rw-r--r--tests/ui/issues/issue-18423.stderr10
-rw-r--r--tests/ui/issues/issue-53251.stderr18
-rw-r--r--tests/ui/issues/issue-60622.stderr9
-rw-r--r--tests/ui/late-bound-lifetimes/mismatched_arg_count.stderr9
-rw-r--r--tests/ui/lifetimes/noisy-follow-up-erro.stderr9
-rw-r--r--tests/ui/methods/method-call-lifetime-args-fail.stderr18
-rw-r--r--tests/ui/resolve/issue-3214.stderr9
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.stderr18
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.stderr18
-rw-r--r--tests/ui/seq-args.stderr18
-rw-r--r--tests/ui/structs/struct-path-associated-type.stderr18
-rw-r--r--tests/ui/structs/structure-constructor-type-mismatch.stderr18
-rw-r--r--tests/ui/suggestions/issue-101421.stderr9
-rw-r--r--tests/ui/suggestions/issue-104287.stderr9
-rw-r--r--tests/ui/suggestions/issue-89064.stderr9
-rw-r--r--tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr9
-rw-r--r--tests/ui/traits/object/vs-lifetime.stderr9
-rw-r--r--tests/ui/traits/test-2.stderr18
-rw-r--r--tests/ui/transmutability/issue-101739-2.stderr17
-rw-r--r--tests/ui/type-alias-enum-variants/enum-variant-generic-args.stderr54
-rw-r--r--tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr78
-rw-r--r--tests/ui/typeck/typeck_type_placeholder_lifetime_1.stderr9
-rw-r--r--tests/ui/typeck/typeck_type_placeholder_lifetime_2.stderr9
-rw-r--r--tests/ui/ufcs/ufcs-qpath-missing-params.stderr9
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr45
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr9
52 files changed, 811 insertions, 401 deletions
diff --git a/compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs b/compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs
index 10be69a9fbb..c2d5627f2b0 100644
--- a/compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs
+++ b/compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs
@@ -888,7 +888,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
         let comma = if args.len() > 0 { ", " } else { "" };
         let trait_path = self.tcx.def_path_str(trait_def_id);
         let method_name = self.tcx.item_name(self.def_id);
-        err.span_suggestion(
+        err.span_suggestion_verbose(
             expr.span,
             msg,
             format!("{trait_path}::{generics}::{method_name}({rcvr}{comma}{rest})"),
@@ -952,7 +952,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
                 s = pluralize!(num_redundant_lt_args),
             );
 
-            err.span_suggestion(
+            err.span_suggestion_verbose(
                 span_redundant_lt_args,
                 msg_lifetimes,
                 "",
@@ -994,7 +994,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
                 s = pluralize!(num_redundant_gen_args),
             );
 
-            err.span_suggestion(
+            err.span_suggestion_verbose(
                 span_redundant_type_or_const_args,
                 msg_types_or_consts,
                 "",
@@ -1044,7 +1044,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
                 },
             );
 
-            err.span_suggestion(span, msg, "", Applicability::MaybeIncorrect);
+            err.span_suggestion_verbose(span, msg, "", Applicability::MaybeIncorrect);
         } else if redundant_lifetime_args && redundant_type_or_const_args {
             remove_lifetime_args(err);
             remove_type_or_const_args(err);
diff --git a/tests/rustdoc-ui/invalid_const_in_lifetime_position.stderr b/tests/rustdoc-ui/invalid_const_in_lifetime_position.stderr
index 50d55284754..ff73d3d5ddd 100644
--- a/tests/rustdoc-ui/invalid_const_in_lifetime_position.stderr
+++ b/tests/rustdoc-ui/invalid_const_in_lifetime_position.stderr
@@ -18,15 +18,18 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
   --> $DIR/invalid_const_in_lifetime_position.rs:4:26
    |
 LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
-   |                          ^--- help: remove these generics
-   |                          |
-   |                          expected 0 generic arguments
+   |                          ^ expected 0 generic arguments
    |
 note: associated type defined here, with 0 generic parameters
   --> $DIR/invalid_const_in_lifetime_position.rs:2:10
    |
 LL |     type Y<'a>;
    |          ^
+help: remove these generics
+   |
+LL - fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
+LL + fn f<'a>(arg : Box<dyn X<Y = &'a ()>>) {}
+   |
 
 error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
   --> $DIR/invalid_const_in_lifetime_position.rs:4:26
@@ -49,9 +52,7 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
   --> $DIR/invalid_const_in_lifetime_position.rs:4:26
    |
 LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
-   |                          ^--- help: remove these generics
-   |                          |
-   |                          expected 0 generic arguments
+   |                          ^ expected 0 generic arguments
    |
 note: associated type defined here, with 0 generic parameters
   --> $DIR/invalid_const_in_lifetime_position.rs:2:10
@@ -59,6 +60,11 @@ note: associated type defined here, with 0 generic parameters
 LL |     type Y<'a>;
    |          ^
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: remove these generics
+   |
+LL - fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
+LL + fn f<'a>(arg : Box<dyn X<Y = &'a ()>>) {}
+   |
 
 error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
   --> $DIR/invalid_const_in_lifetime_position.rs:4:26
@@ -81,9 +87,7 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
   --> $DIR/invalid_const_in_lifetime_position.rs:4:26
    |
 LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
-   |                          ^--- help: remove these generics
-   |                          |
-   |                          expected 0 generic arguments
+   |                          ^ expected 0 generic arguments
    |
 note: associated type defined here, with 0 generic parameters
   --> $DIR/invalid_const_in_lifetime_position.rs:2:10
@@ -91,6 +95,11 @@ note: associated type defined here, with 0 generic parameters
 LL |     type Y<'a>;
    |          ^
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: remove these generics
+   |
+LL - fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
+LL + fn f<'a>(arg : Box<dyn X<Y = &'a ()>>) {}
+   |
 
 error[E0038]: the trait `X` cannot be made into an object
   --> $DIR/invalid_const_in_lifetime_position.rs:4:20
diff --git a/tests/rustdoc-ui/mismatched_arg_count.stderr b/tests/rustdoc-ui/mismatched_arg_count.stderr
index 857bbda2ef4..c58ff7a14df 100644
--- a/tests/rustdoc-ui/mismatched_arg_count.stderr
+++ b/tests/rustdoc-ui/mismatched_arg_count.stderr
@@ -2,15 +2,18 @@ error[E0107]: type alias takes 1 lifetime argument but 2 lifetime arguments were
   --> $DIR/mismatched_arg_count.rs:7:29
    |
 LL | fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {}
-   |                             ^^^^^     -- help: remove this lifetime argument
-   |                             |
-   |                             expected 1 lifetime argument
+   |                             ^^^^^ expected 1 lifetime argument
    |
 note: type alias defined here, with 1 lifetime parameter: `'a`
   --> $DIR/mismatched_arg_count.rs:5:6
    |
 LL | type Alias<'a, T> = <T as Trait<'a>>::Assoc;
    |      ^^^^^ --
+help: remove this lifetime argument
+   |
+LL - fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {}
+LL + fn bar<'a, T: Trait<'a>>(_: Alias<'a, , T>) {}
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/argument-suggestions/issue-100154.stderr b/tests/ui/argument-suggestions/issue-100154.stderr
index 966f56e2a15..1496d994ef3 100644
--- a/tests/ui/argument-suggestions/issue-100154.stderr
+++ b/tests/ui/argument-suggestions/issue-100154.stderr
@@ -2,9 +2,7 @@ error[E0107]: function takes 0 generic arguments but 1 generic argument was supp
   --> $DIR/issue-100154.rs:4:5
    |
 LL |     foo::<()>(());
-   |     ^^^------ help: remove these generics
-   |     |
-   |     expected 0 generic arguments
+   |     ^^^ expected 0 generic arguments
    |
 note: function defined here, with 0 generic parameters
   --> $DIR/issue-100154.rs:1:4
@@ -12,6 +10,11 @@ note: function defined here, with 0 generic parameters
 LL | fn foo(i: impl std::fmt::Display) {}
    |    ^^^
    = note: `impl Trait` cannot be explicitly specified as a generic argument
+help: remove these generics
+   |
+LL -     foo::<()>(());
+LL +     foo(());
+   |
 
 error[E0277]: `()` doesn't implement `std::fmt::Display`
   --> $DIR/issue-100154.rs:4:11
diff --git a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr
index c0b6dcd1512..c50e3fb6405 100644
--- a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr
+++ b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr
@@ -2,15 +2,18 @@ error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supp
   --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
    |
 LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
-   |                                                           ^^^^^^^^^^^^---- help: remove these generics
-   |                                                           |
-   |                                                           expected 0 lifetime arguments
+   |                                                           ^^^^^^^^^^^^ expected 0 lifetime arguments
    |
 note: struct defined here, with 0 lifetime parameters
   --> $DIR/issue-82126-mismatched-subst-and-hir.rs:24:8
    |
 LL | struct LockedMarket<T>(T);
    |        ^^^^^^^^^^^^
+help: remove these generics
+   |
+LL - async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
+LL + async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket {
+   |
 
 error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
   --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
@@ -32,9 +35,7 @@ error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supp
   --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
    |
 LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
-   |                                                           ^^^^^^^^^^^^---- help: remove these generics
-   |                                                           |
-   |                                                           expected 0 lifetime arguments
+   |                                                           ^^^^^^^^^^^^ expected 0 lifetime arguments
    |
 note: struct defined here, with 0 lifetime parameters
   --> $DIR/issue-82126-mismatched-subst-and-hir.rs:24:8
@@ -42,6 +43,11 @@ note: struct defined here, with 0 lifetime parameters
 LL | struct LockedMarket<T>(T);
    |        ^^^^^^^^^^^^
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: remove these generics
+   |
+LL - async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
+LL + async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket {
+   |
 
 error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
   --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
diff --git a/tests/ui/const-generics/adt_const_params/transmutable-ice-110969.stderr b/tests/ui/const-generics/adt_const_params/transmutable-ice-110969.stderr
index a8fc742e89f..91a1053bb6d 100644
--- a/tests/ui/const-generics/adt_const_params/transmutable-ice-110969.stderr
+++ b/tests/ui/const-generics/adt_const_params/transmutable-ice-110969.stderr
@@ -2,9 +2,13 @@ error[E0107]: trait takes at most 2 generic arguments but 3 generic arguments we
   --> $DIR/transmutable-ice-110969.rs:11:14
    |
 LL |         Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME>,
-   |              ^^^^^^^^^^^^^^^^^^^^^               ------ help: remove this generic argument
-   |              |
-   |              expected at most 2 generic arguments
+   |              ^^^^^^^^^^^^^^^^^^^^^ expected at most 2 generic arguments
+   |
+help: remove this generic argument
+   |
+LL -         Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME>,
+LL +         Dst: BikeshedIntrinsicFrom<Src, Context, >,
+   |
 
 error[E0308]: mismatched types
   --> $DIR/transmutable-ice-110969.rs:25:74
diff --git a/tests/ui/const-generics/generic_arg_infer/infer-arg-test.stderr b/tests/ui/const-generics/generic_arg_infer/infer-arg-test.stderr
index 6d8dd017734..f891bbea21e 100644
--- a/tests/ui/const-generics/generic_arg_infer/infer-arg-test.stderr
+++ b/tests/ui/const-generics/generic_arg_infer/infer-arg-test.stderr
@@ -23,15 +23,18 @@ error[E0107]: struct takes 2 generic arguments but 3 generic arguments were supp
   --> $DIR/infer-arg-test.rs:18:10
    |
 LL |   let a: All<_, _, _>;
-   |          ^^^       - help: remove this generic argument
-   |          |
-   |          expected 2 generic arguments
+   |          ^^^ expected 2 generic arguments
    |
 note: struct defined here, with 2 generic parameters: `T`, `N`
   --> $DIR/infer-arg-test.rs:3:8
    |
 LL | struct All<'a, T, const N: usize> {
    |        ^^^     -  --------------
+help: remove this generic argument
+   |
+LL -   let a: All<_, _, _>;
+LL +   let a: All<_, _, >;
+   |
 
 error: aborting due to 4 previous errors
 
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 0c29d94ed5b..78d32b57f87 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
@@ -2,15 +2,18 @@ error[E0107]: function takes 1 generic argument but 2 generic arguments were sup
   --> $DIR/issue_114151.rs:17:5
    |
 LL |     foo::<_, L>([(); L + 1 + L]);
-   |     ^^^      - help: remove this generic argument
-   |     |
-   |     expected 1 generic argument
+   |     ^^^ expected 1 generic argument
    |
 note: function defined here, with 1 generic parameter: `N`
   --> $DIR/issue_114151.rs:4:4
    |
 LL | fn foo<const N: usize>(
    |    ^^^ --------------
+help: remove this generic argument
+   |
+LL -     foo::<_, L>([(); L + 1 + L]);
+LL +     foo::<_, >([(); L + 1 + L]);
+   |
 
 error[E0308]: mismatched types
   --> $DIR/issue_114151.rs:17:18
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-102768.stderr b/tests/ui/const-generics/generic_const_exprs/issue-102768.stderr
index a470c36134c..6bd6eb4e00e 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-102768.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/issue-102768.stderr
@@ -18,15 +18,18 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
   --> $DIR/issue-102768.rs:9:30
    |
 LL |     fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
-   |                              ^--- help: remove these generics
-   |                              |
-   |                              expected 0 generic arguments
+   |                              ^ expected 0 generic arguments
    |
 note: associated type defined here, with 0 generic parameters
   --> $DIR/issue-102768.rs:5:10
    |
 LL |     type Y<'a>;
    |          ^
+help: remove these generics
+   |
+LL -     fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
+LL +     fn f2<'a>(arg: Box<dyn X<Y = &'a ()>>) {}
+   |
 
 error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
   --> $DIR/issue-102768.rs:9:30
@@ -49,9 +52,7 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
   --> $DIR/issue-102768.rs:9:30
    |
 LL |     fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
-   |                              ^--- help: remove these generics
-   |                              |
-   |                              expected 0 generic arguments
+   |                              ^ expected 0 generic arguments
    |
 note: associated type defined here, with 0 generic parameters
   --> $DIR/issue-102768.rs:5:10
@@ -59,6 +60,11 @@ note: associated type defined here, with 0 generic parameters
 LL |     type Y<'a>;
    |          ^
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: remove these generics
+   |
+LL -     fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
+LL +     fn f2<'a>(arg: Box<dyn X<Y = &'a ()>>) {}
+   |
 
 error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
   --> $DIR/issue-102768.rs:9:30
@@ -81,9 +87,7 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
   --> $DIR/issue-102768.rs:9:30
    |
 LL |     fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
-   |                              ^--- help: remove these generics
-   |                              |
-   |                              expected 0 generic arguments
+   |                              ^ expected 0 generic arguments
    |
 note: associated type defined here, with 0 generic parameters
   --> $DIR/issue-102768.rs:5:10
@@ -91,6 +95,11 @@ note: associated type defined here, with 0 generic parameters
 LL |     type Y<'a>;
    |          ^
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: remove these generics
+   |
+LL -     fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
+LL +     fn f2<'a>(arg: Box<dyn X<Y = &'a ()>>) {}
+   |
 
 error[E0038]: the trait `X` cannot be made into an object
   --> $DIR/issue-102768.rs:9:24
diff --git a/tests/ui/const-generics/incorrect-number-of-const-args.stderr b/tests/ui/const-generics/incorrect-number-of-const-args.stderr
index 01ac4e69a05..97eb47275c2 100644
--- a/tests/ui/const-generics/incorrect-number-of-const-args.stderr
+++ b/tests/ui/const-generics/incorrect-number-of-const-args.stderr
@@ -20,15 +20,18 @@ error[E0107]: function takes 2 generic arguments but 3 generic arguments were su
   --> $DIR/incorrect-number-of-const-args.rs:9:5
    |
 LL |     foo::<0, 0, 0>();
-   |     ^^^         - help: remove this generic argument
-   |     |
-   |     expected 2 generic arguments
+   |     ^^^ expected 2 generic arguments
    |
 note: function defined here, with 2 generic parameters: `X`, `Y`
   --> $DIR/incorrect-number-of-const-args.rs:1:4
    |
 LL | fn foo<const X: usize, const Y: usize>() -> usize {
    |    ^^^ --------------  --------------
+help: remove this generic argument
+   |
+LL -     foo::<0, 0, 0>();
+LL +     foo::<0, 0, >();
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/const-generics/invalid-const-arg-for-type-param.stderr b/tests/ui/const-generics/invalid-const-arg-for-type-param.stderr
index 4a649d8a7e8..d4f899f8377 100644
--- a/tests/ui/const-generics/invalid-const-arg-for-type-param.stderr
+++ b/tests/ui/const-generics/invalid-const-arg-for-type-param.stderr
@@ -27,15 +27,18 @@ error[E0107]: struct takes 0 generic arguments but 1 generic argument was suppli
   --> $DIR/invalid-const-arg-for-type-param.rs:12:5
    |
 LL |     S::<0>;
-   |     ^----- help: remove these generics
-   |     |
-   |     expected 0 generic arguments
+   |     ^ expected 0 generic arguments
    |
 note: struct defined here, with 0 generic parameters
   --> $DIR/invalid-const-arg-for-type-param.rs:3:8
    |
 LL | struct S;
    |        ^
+help: remove these generics
+   |
+LL -     S::<0>;
+LL +     S;
+   |
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/const-generics/invalid-constant-in-args.stderr b/tests/ui/const-generics/invalid-constant-in-args.stderr
index 158b9722ee6..ed715257ac1 100644
--- a/tests/ui/const-generics/invalid-constant-in-args.stderr
+++ b/tests/ui/const-generics/invalid-constant-in-args.stderr
@@ -2,9 +2,13 @@ error[E0107]: struct takes 1 generic argument but 2 generic arguments were suppl
   --> $DIR/invalid-constant-in-args.rs:4:12
    |
 LL |     let _: Cell<&str, "a"> = Cell::new("");
-   |            ^^^^       --- help: remove this generic argument
-   |            |
-   |            expected 1 generic argument
+   |            ^^^^ expected 1 generic argument
+   |
+help: remove this generic argument
+   |
+LL -     let _: Cell<&str, "a"> = Cell::new("");
+LL +     let _: Cell<&str, > = Cell::new("");
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/constructor-lifetime-args.stderr b/tests/ui/constructor-lifetime-args.stderr
index a18123fe19c..9e0bc3c6c1a 100644
--- a/tests/ui/constructor-lifetime-args.stderr
+++ b/tests/ui/constructor-lifetime-args.stderr
@@ -20,15 +20,18 @@ error[E0107]: struct takes 2 lifetime arguments but 3 lifetime arguments were su
   --> $DIR/constructor-lifetime-args.rs:19:5
    |
 LL |     S::<'static, 'static, 'static>(&0, &0);
-   |     ^                     ------- help: remove this lifetime argument
-   |     |
-   |     expected 2 lifetime arguments
+   |     ^ expected 2 lifetime arguments
    |
 note: struct defined here, with 2 lifetime parameters: `'a`, `'b`
   --> $DIR/constructor-lifetime-args.rs:9:8
    |
 LL | struct S<'a, 'b>(&'a u8, &'b u8);
    |        ^ --  --
+help: remove this lifetime argument
+   |
+LL -     S::<'static, 'static, 'static>(&0, &0);
+LL +     S::<'static, 'static, >(&0, &0);
+   |
 
 error[E0107]: enum takes 2 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/constructor-lifetime-args.rs:22:8
@@ -52,15 +55,18 @@ error[E0107]: enum takes 2 lifetime arguments but 3 lifetime arguments were supp
   --> $DIR/constructor-lifetime-args.rs:24:8
    |
 LL |     E::V::<'static, 'static, 'static>(&0);
-   |        ^                     ------- help: remove this lifetime argument
-   |        |
-   |        expected 2 lifetime arguments
+   |        ^ expected 2 lifetime arguments
    |
 note: enum defined here, with 2 lifetime parameters: `'a`, `'b`
   --> $DIR/constructor-lifetime-args.rs:10:6
    |
 LL | enum E<'a, 'b> {
    |      ^ --  --
+help: remove this lifetime argument
+   |
+LL -     E::V::<'static, 'static, 'static>(&0);
+LL +     E::V::<'static, 'static, >(&0);
+   |
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/consts/effect_param.stderr b/tests/ui/consts/effect_param.stderr
index dba5d49b792..3777e20e4c0 100644
--- a/tests/ui/consts/effect_param.stderr
+++ b/tests/ui/consts/effect_param.stderr
@@ -2,33 +2,49 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli
   --> $DIR/effect_param.rs:11:9
    |
 LL |     i8::checked_sub::<false>(42, 43);
-   |         ^^^^^^^^^^^--------- help: remove these generics
-   |         |
-   |         expected 0 generic arguments
+   |         ^^^^^^^^^^^ expected 0 generic arguments
+   |
+help: remove these generics
+   |
+LL -     i8::checked_sub::<false>(42, 43);
+LL +     i8::checked_sub(42, 43);
+   |
 
 error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/effect_param.rs:13:9
    |
 LL |     i8::checked_sub::<true>(42, 43);
-   |         ^^^^^^^^^^^-------- help: remove these generics
-   |         |
-   |         expected 0 generic arguments
+   |         ^^^^^^^^^^^ expected 0 generic arguments
+   |
+help: remove these generics
+   |
+LL -     i8::checked_sub::<true>(42, 43);
+LL +     i8::checked_sub(42, 43);
+   |
 
 error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/effect_param.rs:4:9
    |
 LL |     i8::checked_sub::<true>(42, 43);
-   |         ^^^^^^^^^^^-------- help: remove these generics
-   |         |
-   |         expected 0 generic arguments
+   |         ^^^^^^^^^^^ expected 0 generic arguments
+   |
+help: remove these generics
+   |
+LL -     i8::checked_sub::<true>(42, 43);
+LL +     i8::checked_sub(42, 43);
+   |
 
 error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/effect_param.rs:6:9
    |
 LL |     i8::checked_sub::<false>(42, 43);
-   |         ^^^^^^^^^^^--------- help: remove these generics
-   |         |
-   |         expected 0 generic arguments
+   |         ^^^^^^^^^^^ expected 0 generic arguments
+   |
+help: remove these generics
+   |
+LL -     i8::checked_sub::<false>(42, 43);
+LL +     i8::checked_sub(42, 43);
+   |
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/error-codes/E0107.stderr b/tests/ui/error-codes/E0107.stderr
index 3f540eb08bc..c6317270f9b 100644
--- a/tests/ui/error-codes/E0107.stderr
+++ b/tests/ui/error-codes/E0107.stderr
@@ -20,113 +20,137 @@ error[E0107]: enum takes 0 lifetime arguments but 1 lifetime argument was suppli
   --> $DIR/E0107.rs:17:10
    |
 LL |     bar: Bar<'a>,
-   |          ^^^---- help: remove these generics
-   |          |
-   |          expected 0 lifetime arguments
+   |          ^^^ expected 0 lifetime arguments
    |
 note: enum defined here, with 0 lifetime parameters
   --> $DIR/E0107.rs:6:6
    |
 LL | enum Bar {
    |      ^^^
+help: remove these generics
+   |
+LL -     bar: Bar<'a>,
+LL +     bar: Bar,
+   |
 
 error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied
   --> $DIR/E0107.rs:21:11
    |
 LL |     foo2: Foo<'a, 'b, 'c>,
-   |           ^^^     ------ help: remove these lifetime arguments
-   |           |
-   |           expected 1 lifetime argument
+   |           ^^^ expected 1 lifetime argument
    |
 note: struct defined here, with 1 lifetime parameter: `'a`
   --> $DIR/E0107.rs:1:8
    |
 LL | struct Foo<'a>(&'a str);
    |        ^^^ --
+help: remove these lifetime arguments
+   |
+LL -     foo2: Foo<'a, 'b, 'c>,
+LL +     foo2: Foo<'a, >,
+   |
 
 error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied
   --> $DIR/E0107.rs:25:11
    |
 LL |     qux1: Qux<'a, 'b, i32>,
-   |           ^^^     -- help: remove this lifetime argument
-   |           |
-   |           expected 1 lifetime argument
+   |           ^^^ expected 1 lifetime argument
    |
 note: struct defined here, with 1 lifetime parameter: `'a`
   --> $DIR/E0107.rs:3:8
    |
 LL | struct Qux<'a, T>(&'a T);
    |        ^^^ --
+help: remove this lifetime argument
+   |
+LL -     qux1: Qux<'a, 'b, i32>,
+LL +     qux1: Qux<'a, , i32>,
+   |
 
 error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied
   --> $DIR/E0107.rs:29:11
    |
 LL |     qux2: Qux<'a, i32, 'b>,
-   |           ^^^          -- help: remove this lifetime argument
-   |           |
-   |           expected 1 lifetime argument
+   |           ^^^ expected 1 lifetime argument
    |
 note: struct defined here, with 1 lifetime parameter: `'a`
   --> $DIR/E0107.rs:3:8
    |
 LL | struct Qux<'a, T>(&'a T);
    |        ^^^ --
+help: remove this lifetime argument
+   |
+LL -     qux2: Qux<'a, i32, 'b>,
+LL +     qux2: Qux<'a, i32, >,
+   |
 
 error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied
   --> $DIR/E0107.rs:33:11
    |
 LL |     qux3: Qux<'a, 'b, 'c, i32>,
-   |           ^^^     ------ help: remove these lifetime arguments
-   |           |
-   |           expected 1 lifetime argument
+   |           ^^^ expected 1 lifetime argument
    |
 note: struct defined here, with 1 lifetime parameter: `'a`
   --> $DIR/E0107.rs:3:8
    |
 LL | struct Qux<'a, T>(&'a T);
    |        ^^^ --
+help: remove these lifetime arguments
+   |
+LL -     qux3: Qux<'a, 'b, 'c, i32>,
+LL +     qux3: Qux<'a, , i32>,
+   |
 
 error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied
   --> $DIR/E0107.rs:37:11
    |
 LL |     qux4: Qux<'a, i32, 'b, 'c>,
-   |           ^^^          ------ help: remove these lifetime arguments
-   |           |
-   |           expected 1 lifetime argument
+   |           ^^^ expected 1 lifetime argument
    |
 note: struct defined here, with 1 lifetime parameter: `'a`
   --> $DIR/E0107.rs:3:8
    |
 LL | struct Qux<'a, T>(&'a T);
    |        ^^^ --
+help: remove these lifetime arguments
+   |
+LL -     qux4: Qux<'a, i32, 'b, 'c>,
+LL +     qux4: Qux<'a, i32, >,
+   |
 
 error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied
   --> $DIR/E0107.rs:41:11
    |
 LL |     qux5: Qux<'a, 'b, i32, 'c>,
-   |           ^^^     -- help: remove this lifetime argument
-   |           |
-   |           expected 1 lifetime argument
+   |           ^^^ expected 1 lifetime argument
    |
 note: struct defined here, with 1 lifetime parameter: `'a`
   --> $DIR/E0107.rs:3:8
    |
 LL | struct Qux<'a, T>(&'a T);
    |        ^^^ --
+help: remove this lifetime argument
+   |
+LL -     qux5: Qux<'a, 'b, i32, 'c>,
+LL +     qux5: Qux<'a, , i32, 'c>,
+   |
 
 error[E0107]: struct takes 0 lifetime arguments but 2 lifetime arguments were supplied
   --> $DIR/E0107.rs:45:11
    |
 LL |     quux: Quux<'a, i32, 'b>,
-   |           ^^^^ -- help: remove this lifetime argument
-   |           |
-   |           expected 0 lifetime arguments
+   |           ^^^^ expected 0 lifetime arguments
    |
 note: struct defined here, with 0 lifetime parameters
   --> $DIR/E0107.rs:4:8
    |
 LL | struct Quux<T>(T);
    |        ^^^^
+help: remove this lifetime argument
+   |
+LL -     quux: Quux<'a, i32, 'b>,
+LL +     quux: Quux<, i32, 'b>,
+   |
 
 error[E0107]: trait takes 0 generic arguments but 2 generic arguments were supplied
   --> $DIR/E0107.rs:55:27
diff --git a/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr b/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr
index fcd3e7d9aac..18f37207ee5 100644
--- a/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr
+++ b/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr
@@ -43,15 +43,18 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
   --> $DIR/gat-trait-path-parenthesised-args.rs:5:27
    |
 LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
-   |                           ^---- help: remove these generics
-   |                           |
-   |                           expected 0 generic arguments
+   |                           ^ expected 0 generic arguments
    |
 note: associated type defined here, with 0 generic parameters
   --> $DIR/gat-trait-path-parenthesised-args.rs:2:8
    |
 LL |   type Y<'a>;
    |        ^
+help: remove these generics
+   |
+LL - fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
+LL + fn foo<'a>(arg: Box<dyn X<Y = &'a ()>>) {}
+   |
 
 error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
   --> $DIR/gat-trait-path-parenthesised-args.rs:5:27
@@ -74,9 +77,7 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
   --> $DIR/gat-trait-path-parenthesised-args.rs:5:27
    |
 LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
-   |                           ^---- help: remove these generics
-   |                           |
-   |                           expected 0 generic arguments
+   |                           ^ expected 0 generic arguments
    |
 note: associated type defined here, with 0 generic parameters
   --> $DIR/gat-trait-path-parenthesised-args.rs:2:8
@@ -84,6 +85,11 @@ note: associated type defined here, with 0 generic parameters
 LL |   type Y<'a>;
    |        ^
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: remove these generics
+   |
+LL - fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
+LL + fn foo<'a>(arg: Box<dyn X<Y = &'a ()>>) {}
+   |
 
 error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
   --> $DIR/gat-trait-path-parenthesised-args.rs:5:27
@@ -106,9 +112,7 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
   --> $DIR/gat-trait-path-parenthesised-args.rs:5:27
    |
 LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
-   |                           ^---- help: remove these generics
-   |                           |
-   |                           expected 0 generic arguments
+   |                           ^ expected 0 generic arguments
    |
 note: associated type defined here, with 0 generic parameters
   --> $DIR/gat-trait-path-parenthesised-args.rs:2:8
@@ -116,6 +120,11 @@ note: associated type defined here, with 0 generic parameters
 LL |   type Y<'a>;
    |        ^
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: remove these generics
+   |
+LL - fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
+LL + fn foo<'a>(arg: Box<dyn X<Y = &'a ()>>) {}
+   |
 
 error[E0224]: at least one trait is required for an object type
   --> $DIR/gat-trait-path-parenthesised-args.rs:5:29
diff --git a/tests/ui/generic-associated-types/parameter_number_and_kind.stderr b/tests/ui/generic-associated-types/parameter_number_and_kind.stderr
index 4523044b588..9eb0b8ca641 100644
--- a/tests/ui/generic-associated-types/parameter_number_and_kind.stderr
+++ b/tests/ui/generic-associated-types/parameter_number_and_kind.stderr
@@ -2,15 +2,18 @@ error[E0107]: associated type takes 1 lifetime argument but 2 lifetime arguments
   --> $DIR/parameter_number_and_kind.rs:11:24
    |
 LL |     type FErr1 = Self::E<'static, 'static>;
-   |                        ^          ------- help: remove this lifetime argument
-   |                        |
-   |                        expected 1 lifetime argument
+   |                        ^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
   --> $DIR/parameter_number_and_kind.rs:8:10
    |
 LL |     type E<'a, T>;
    |          ^ --
+help: remove this lifetime argument
+   |
+LL -     type FErr1 = Self::E<'static, 'static>;
+LL +     type FErr1 = Self::E<'static, >;
+   |
 
 error[E0107]: associated type takes 1 generic argument but 0 generic arguments were supplied
   --> $DIR/parameter_number_and_kind.rs:11:24
@@ -32,15 +35,18 @@ error[E0107]: associated type takes 1 generic argument but 2 generic arguments w
   --> $DIR/parameter_number_and_kind.rs:14:27
    |
 LL |     type FErr2<T> = Self::E<'static, T, u32>;
-   |                           ^             --- help: remove this generic argument
-   |                           |
-   |                           expected 1 generic argument
+   |                           ^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
   --> $DIR/parameter_number_and_kind.rs:8:10
    |
 LL |     type E<'a, T>;
    |          ^     -
+help: remove this generic argument
+   |
+LL -     type FErr2<T> = Self::E<'static, T, u32>;
+LL +     type FErr2<T> = Self::E<'static, T, >;
+   |
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr b/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr
index 2090f75aed3..f73022922a5 100644
--- a/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr
+++ b/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr
@@ -18,15 +18,18 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
   --> $DIR/trait-path-type-error-once-implemented.rs:6:29
    |
 LL |   fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
-   |                             ^--- help: remove these generics
-   |                             |
-   |                             expected 0 generic arguments
+   |                             ^ expected 0 generic arguments
    |
 note: associated type defined here, with 0 generic parameters
   --> $DIR/trait-path-type-error-once-implemented.rs:2:10
    |
 LL |     type Y<'a>;
    |          ^
+help: remove these generics
+   |
+LL -   fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
+LL +   fn f2<'a>(arg : Box<dyn X<Y = &'a ()>>) {}
+   |
 
 error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
   --> $DIR/trait-path-type-error-once-implemented.rs:6:29
@@ -49,9 +52,7 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
   --> $DIR/trait-path-type-error-once-implemented.rs:6:29
    |
 LL |   fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
-   |                             ^--- help: remove these generics
-   |                             |
-   |                             expected 0 generic arguments
+   |                             ^ expected 0 generic arguments
    |
 note: associated type defined here, with 0 generic parameters
   --> $DIR/trait-path-type-error-once-implemented.rs:2:10
@@ -59,6 +60,11 @@ note: associated type defined here, with 0 generic parameters
 LL |     type Y<'a>;
    |          ^
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: remove these generics
+   |
+LL -   fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
+LL +   fn f2<'a>(arg : Box<dyn X<Y = &'a ()>>) {}
+   |
 
 error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
   --> $DIR/trait-path-type-error-once-implemented.rs:6:29
@@ -81,9 +87,7 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
   --> $DIR/trait-path-type-error-once-implemented.rs:6:29
    |
 LL |   fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
-   |                             ^--- help: remove these generics
-   |                             |
-   |                             expected 0 generic arguments
+   |                             ^ expected 0 generic arguments
    |
 note: associated type defined here, with 0 generic parameters
   --> $DIR/trait-path-type-error-once-implemented.rs:2:10
@@ -91,6 +95,11 @@ note: associated type defined here, with 0 generic parameters
 LL |     type Y<'a>;
    |          ^
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: remove these generics
+   |
+LL -   fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
+LL +   fn f2<'a>(arg : Box<dyn X<Y = &'a ()>>) {}
+   |
 
 error[E0038]: the trait `X` cannot be made into an object
   --> $DIR/trait-path-type-error-once-implemented.rs:6:23
diff --git a/tests/ui/generics/bad-mid-path-type-params.stderr b/tests/ui/generics/bad-mid-path-type-params.stderr
index 71e15dd4c92..7f4ba781e6a 100644
--- a/tests/ui/generics/bad-mid-path-type-params.stderr
+++ b/tests/ui/generics/bad-mid-path-type-params.stderr
@@ -2,71 +2,86 @@ error[E0107]: associated function takes 1 generic argument but 2 generic argumen
   --> $DIR/bad-mid-path-type-params.rs:30:16
    |
 LL |     let _ = S::new::<isize,f64>(1, 1.0);
-   |                ^^^         --- help: remove this generic argument
-   |                |
-   |                expected 1 generic argument
+   |                ^^^ expected 1 generic argument
    |
 note: associated function defined here, with 1 generic parameter: `U`
   --> $DIR/bad-mid-path-type-params.rs:6:8
    |
 LL |     fn new<U>(x: T, _: U) -> S<T> {
    |        ^^^ -
+help: remove this generic argument
+   |
+LL -     let _ = S::new::<isize,f64>(1, 1.0);
+LL +     let _ = S::new::<isize,>(1, 1.0);
+   |
 
 error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/bad-mid-path-type-params.rs:33:13
    |
 LL |     let _ = S::<'a,isize>::new::<f64>(1, 1.0);
-   |             ^   -- help: remove this lifetime argument
-   |             |
-   |             expected 0 lifetime arguments
+   |             ^ expected 0 lifetime arguments
    |
 note: struct defined here, with 0 lifetime parameters
   --> $DIR/bad-mid-path-type-params.rs:1:8
    |
 LL | struct S<T> {
    |        ^
+help: remove this lifetime argument
+   |
+LL -     let _ = S::<'a,isize>::new::<f64>(1, 1.0);
+LL +     let _ = S::<,isize>::new::<f64>(1, 1.0);
+   |
 
 error[E0107]: associated function takes 1 generic argument but 2 generic arguments were supplied
   --> $DIR/bad-mid-path-type-params.rs:36:24
    |
 LL |     let _: S2 = Trait::new::<isize,f64>(1, 1.0);
-   |                        ^^^         --- help: remove this generic argument
-   |                        |
-   |                        expected 1 generic argument
+   |                        ^^^ expected 1 generic argument
    |
 note: associated function defined here, with 1 generic parameter: `U`
   --> $DIR/bad-mid-path-type-params.rs:14:8
    |
 LL |     fn new<U>(x: T, y: U) -> Self;
    |        ^^^ -
+help: remove this generic argument
+   |
+LL -     let _: S2 = Trait::new::<isize,f64>(1, 1.0);
+LL +     let _: S2 = Trait::new::<isize,>(1, 1.0);
+   |
 
 error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/bad-mid-path-type-params.rs:39:17
    |
 LL |     let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0);
-   |                 ^^^^^   -- help: remove this lifetime argument
-   |                 |
-   |                 expected 0 lifetime arguments
+   |                 ^^^^^ expected 0 lifetime arguments
    |
 note: trait defined here, with 0 lifetime parameters
   --> $DIR/bad-mid-path-type-params.rs:13:7
    |
 LL | trait Trait<T> {
    |       ^^^^^
+help: remove this lifetime argument
+   |
+LL -     let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0);
+LL +     let _: S2 = Trait::<,isize>::new::<f64,f64>(1, 1.0);
+   |
 
 error[E0107]: associated function takes 1 generic argument but 2 generic arguments were supplied
   --> $DIR/bad-mid-path-type-params.rs:39:36
    |
 LL |     let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0);
-   |                                    ^^^       --- help: remove this generic argument
-   |                                    |
-   |                                    expected 1 generic argument
+   |                                    ^^^ expected 1 generic argument
    |
 note: associated function defined here, with 1 generic parameter: `U`
   --> $DIR/bad-mid-path-type-params.rs:14:8
    |
 LL |     fn new<U>(x: T, y: U) -> Self;
    |        ^^^ -
+help: remove this generic argument
+   |
+LL -     let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0);
+LL +     let _: S2 = Trait::<'a,isize>::new::<f64,>(1, 1.0);
+   |
 
 error: aborting due to 5 previous errors
 
diff --git a/tests/ui/generics/foreign-generic-mismatch.stderr b/tests/ui/generics/foreign-generic-mismatch.stderr
index 5322b3f919d..7e8e854d642 100644
--- a/tests/ui/generics/foreign-generic-mismatch.stderr
+++ b/tests/ui/generics/foreign-generic-mismatch.stderr
@@ -20,15 +20,18 @@ error[E0107]: function takes 1 lifetime argument but 2 lifetime arguments were s
   --> $DIR/foreign-generic-mismatch.rs:8:31
    |
 LL |     foreign_generic_mismatch::lt_arg::<'static, 'static>();
-   |                               ^^^^^^            ------- help: remove this lifetime argument
-   |                               |
-   |                               expected 1 lifetime argument
+   |                               ^^^^^^ expected 1 lifetime argument
    |
 note: function defined here, with 1 lifetime parameter: `'a`
   --> $DIR/auxiliary/foreign-generic-mismatch.rs:3:8
    |
 LL | pub fn lt_arg<'a: 'a>() {}
    |        ^^^^^^ --
+help: remove this lifetime argument
+   |
+LL -     foreign_generic_mismatch::lt_arg::<'static, 'static>();
+LL +     foreign_generic_mismatch::lt_arg::<'static, >();
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/generics/generic-arg-mismatch-recover.stderr b/tests/ui/generics/generic-arg-mismatch-recover.stderr
index f549a7180fc..cb25fa7af40 100644
--- a/tests/ui/generics/generic-arg-mismatch-recover.stderr
+++ b/tests/ui/generics/generic-arg-mismatch-recover.stderr
@@ -2,43 +2,52 @@ error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were sup
   --> $DIR/generic-arg-mismatch-recover.rs:6:5
    |
 LL |     Foo::<'static, 'static, ()>(&0);
-   |     ^^^            ------- help: remove this lifetime argument
-   |     |
-   |     expected 1 lifetime argument
+   |     ^^^ expected 1 lifetime argument
    |
 note: struct defined here, with 1 lifetime parameter: `'a`
   --> $DIR/generic-arg-mismatch-recover.rs:1:8
    |
 LL | struct Foo<'a, T: 'a>(&'a T);
    |        ^^^ --
+help: remove this lifetime argument
+   |
+LL -     Foo::<'static, 'static, ()>(&0);
+LL +     Foo::<'static, , ()>(&0);
+   |
 
 error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied
   --> $DIR/generic-arg-mismatch-recover.rs:9:5
    |
 LL |     Bar::<'static, 'static, ()>(&());
-   |     ^^^            ------- help: remove this lifetime argument
-   |     |
-   |     expected 1 lifetime argument
+   |     ^^^ expected 1 lifetime argument
    |
 note: struct defined here, with 1 lifetime parameter: `'a`
   --> $DIR/generic-arg-mismatch-recover.rs:3:8
    |
 LL | struct Bar<'a>(&'a ());
    |        ^^^ --
+help: remove this lifetime argument
+   |
+LL -     Bar::<'static, 'static, ()>(&());
+LL +     Bar::<'static, , ()>(&());
+   |
 
 error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/generic-arg-mismatch-recover.rs:9:5
    |
 LL |     Bar::<'static, 'static, ()>(&());
-   |     ^^^                     -- help: remove this generic argument
-   |     |
-   |     expected 0 generic arguments
+   |     ^^^ expected 0 generic arguments
    |
 note: struct defined here, with 0 generic parameters
   --> $DIR/generic-arg-mismatch-recover.rs:3:8
    |
 LL | struct Bar<'a>(&'a ());
    |        ^^^
+help: remove this generic argument
+   |
+LL -     Bar::<'static, 'static, ()>(&());
+LL +     Bar::<'static, 'static, >(&());
+   |
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/generics/generic-impl-more-params-with-defaults.stderr b/tests/ui/generics/generic-impl-more-params-with-defaults.stderr
index c5812abfd3d..edbe7a5e139 100644
--- a/tests/ui/generics/generic-impl-more-params-with-defaults.stderr
+++ b/tests/ui/generics/generic-impl-more-params-with-defaults.stderr
@@ -2,15 +2,18 @@ error[E0107]: struct takes at most 2 generic arguments but 3 generic arguments w
   --> $DIR/generic-impl-more-params-with-defaults.rs:13:5
    |
 LL |     Vec::<isize, Heap, bool>::new();
-   |     ^^^                ---- help: remove this generic argument
-   |     |
-   |     expected at most 2 generic arguments
+   |     ^^^ expected at most 2 generic arguments
    |
 note: struct defined here, with at most 2 generic parameters: `T`, `A`
   --> $DIR/generic-impl-more-params-with-defaults.rs:5:8
    |
 LL | struct Vec<T, A = Heap>(
    |        ^^^ -  --------
+help: remove this generic argument
+   |
+LL -     Vec::<isize, Heap, bool>::new();
+LL +     Vec::<isize, Heap, >::new();
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/generics/generic-type-more-params-with-defaults.stderr b/tests/ui/generics/generic-type-more-params-with-defaults.stderr
index c44f6b7ddc0..27752af1ad6 100644
--- a/tests/ui/generics/generic-type-more-params-with-defaults.stderr
+++ b/tests/ui/generics/generic-type-more-params-with-defaults.stderr
@@ -2,15 +2,18 @@ error[E0107]: struct takes at most 2 generic arguments but 3 generic arguments w
   --> $DIR/generic-type-more-params-with-defaults.rs:9:12
    |
 LL |     let _: Vec<isize, Heap, bool>;
-   |            ^^^              ---- help: remove this generic argument
-   |            |
-   |            expected at most 2 generic arguments
+   |            ^^^ expected at most 2 generic arguments
    |
 note: struct defined here, with at most 2 generic parameters: `T`, `A`
   --> $DIR/generic-type-more-params-with-defaults.rs:5:8
    |
 LL | struct Vec<T, A = Heap>(
    |        ^^^ -  --------
+help: remove this generic argument
+   |
+LL -     let _: Vec<isize, Heap, bool>;
+LL +     let _: Vec<isize, Heap, >;
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/generics/wrong-number-of-args.stderr b/tests/ui/generics/wrong-number-of-args.stderr
index e04408a0fdf..9df759bf29b 100644
--- a/tests/ui/generics/wrong-number-of-args.stderr
+++ b/tests/ui/generics/wrong-number-of-args.stderr
@@ -171,71 +171,86 @@ error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supp
   --> $DIR/wrong-number-of-args.rs:6:14
    |
 LL |     type B = Ty<'static>;
-   |              ^^--------- help: remove these generics
-   |              |
-   |              expected 0 lifetime arguments
+   |              ^^ expected 0 lifetime arguments
    |
 note: struct defined here, with 0 lifetime parameters
   --> $DIR/wrong-number-of-args.rs:2:12
    |
 LL |     struct Ty;
    |            ^^
+help: remove these generics
+   |
+LL -     type B = Ty<'static>;
+LL +     type B = Ty;
+   |
 
 error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/wrong-number-of-args.rs:10:14
    |
 LL |     type C = Ty<'static, usize>;
-   |              ^^ ------- help: remove this lifetime argument
-   |              |
-   |              expected 0 lifetime arguments
+   |              ^^ expected 0 lifetime arguments
    |
 note: struct defined here, with 0 lifetime parameters
   --> $DIR/wrong-number-of-args.rs:2:12
    |
 LL |     struct Ty;
    |            ^^
+help: remove this lifetime argument
+   |
+LL -     type C = Ty<'static, usize>;
+LL +     type C = Ty<, usize>;
+   |
 
 error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/wrong-number-of-args.rs:10:14
    |
 LL |     type C = Ty<'static, usize>;
-   |              ^^          ----- help: remove this generic argument
-   |              |
-   |              expected 0 generic arguments
+   |              ^^ expected 0 generic arguments
    |
 note: struct defined here, with 0 generic parameters
   --> $DIR/wrong-number-of-args.rs:2:12
    |
 LL |     struct Ty;
    |            ^^
+help: remove this generic argument
+   |
+LL -     type C = Ty<'static, usize>;
+LL +     type C = Ty<'static, >;
+   |
 
 error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/wrong-number-of-args.rs:16:14
    |
 LL |     type D = Ty<'static, usize, { 0 }>;
-   |              ^^ ------- help: remove this lifetime argument
-   |              |
-   |              expected 0 lifetime arguments
+   |              ^^ expected 0 lifetime arguments
    |
 note: struct defined here, with 0 lifetime parameters
   --> $DIR/wrong-number-of-args.rs:2:12
    |
 LL |     struct Ty;
    |            ^^
+help: remove this lifetime argument
+   |
+LL -     type D = Ty<'static, usize, { 0 }>;
+LL +     type D = Ty<, usize, { 0 }>;
+   |
 
 error[E0107]: struct takes 0 generic arguments but 2 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:16:14
    |
 LL |     type D = Ty<'static, usize, { 0 }>;
-   |              ^^          ------------ help: remove these generic arguments
-   |              |
-   |              expected 0 generic arguments
+   |              ^^ expected 0 generic arguments
    |
 note: struct defined here, with 0 generic parameters
   --> $DIR/wrong-number-of-args.rs:2:12
    |
 LL |     struct Ty;
    |            ^^
+help: remove these generic arguments
+   |
+LL -     type D = Ty<'static, usize, { 0 }>;
+LL +     type D = Ty<'static, >;
+   |
 
 error[E0107]: missing generics for struct `type_and_type::Ty`
   --> $DIR/wrong-number-of-args.rs:26:14
@@ -275,15 +290,18 @@ error[E0107]: struct takes 2 generic arguments but 3 generic arguments were supp
   --> $DIR/wrong-number-of-args.rs:36:14
    |
 LL |     type D = Ty<usize, String, char>;
-   |              ^^                ---- help: remove this generic argument
-   |              |
-   |              expected 2 generic arguments
+   |              ^^ expected 2 generic arguments
    |
 note: struct defined here, with 2 generic parameters: `A`, `B`
   --> $DIR/wrong-number-of-args.rs:24:12
    |
 LL |     struct Ty<A, B>(A, B);
    |            ^^ -  -
+help: remove this generic argument
+   |
+LL -     type D = Ty<usize, String, char>;
+LL +     type D = Ty<usize, String, >;
+   |
 
 error[E0107]: struct takes 2 generic arguments but 0 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:40:14
@@ -353,29 +371,35 @@ error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were sup
   --> $DIR/wrong-number-of-args.rs:70:14
    |
 LL |     type F = Ty<'static, usize, 'static, usize>;
-   |              ^^                 ------- help: remove this lifetime argument
-   |              |
-   |              expected 1 lifetime argument
+   |              ^^ expected 1 lifetime argument
    |
 note: struct defined here, with 1 lifetime parameter: `'a`
   --> $DIR/wrong-number-of-args.rs:46:12
    |
 LL |     struct Ty<'a, T>(&'a T);
    |            ^^ --
+help: remove this lifetime argument
+   |
+LL -     type F = Ty<'static, usize, 'static, usize>;
+LL +     type F = Ty<'static, usize, , usize>;
+   |
 
 error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:70:14
    |
 LL |     type F = Ty<'static, usize, 'static, usize>;
-   |              ^^                          ----- help: remove this generic argument
-   |              |
-   |              expected 1 generic argument
+   |              ^^ expected 1 generic argument
    |
 note: struct defined here, with 1 generic parameter: `T`
   --> $DIR/wrong-number-of-args.rs:46:12
    |
 LL |     struct Ty<'a, T>(&'a T);
    |            ^^     -
+help: remove this generic argument
+   |
+LL -     type F = Ty<'static, usize, 'static, usize>;
+LL +     type F = Ty<'static, usize, 'static, >;
+   |
 
 error[E0107]: missing generics for struct `type_and_type_and_type::Ty`
   --> $DIR/wrong-number-of-args.rs:80:14
@@ -415,15 +439,18 @@ error[E0107]: struct takes at most 3 generic arguments but 4 generic arguments w
   --> $DIR/wrong-number-of-args.rs:92:14
    |
 LL |     type E = Ty<usize, String, char, f64>;
-   |              ^^                      --- help: remove this generic argument
-   |              |
-   |              expected at most 3 generic arguments
+   |              ^^ expected at most 3 generic arguments
    |
 note: struct defined here, with at most 3 generic parameters: `A`, `B`, `C`
   --> $DIR/wrong-number-of-args.rs:78:12
    |
 LL |     struct Ty<A, B, C = &'static str>(A, B, C);
    |            ^^ -  -  ----------------
+help: remove this generic argument
+   |
+LL -     type E = Ty<usize, String, char, f64>;
+LL +     type E = Ty<usize, String, char, >;
+   |
 
 error[E0107]: struct takes at least 2 generic arguments but 0 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:96:14
@@ -445,29 +472,35 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
   --> $DIR/wrong-number-of-args.rs:116:22
    |
 LL |     type A = Box<dyn NonGeneric<usize>>;
-   |                      ^^^^^^^^^^------- help: remove these generics
-   |                      |
-   |                      expected 0 generic arguments
+   |                      ^^^^^^^^^^ expected 0 generic arguments
    |
 note: trait defined here, with 0 generic parameters
   --> $DIR/wrong-number-of-args.rs:104:11
    |
 LL |     trait NonGeneric {
    |           ^^^^^^^^^^
+help: remove these generics
+   |
+LL -     type A = Box<dyn NonGeneric<usize>>;
+LL +     type A = Box<dyn NonGeneric>;
+   |
 
 error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied
   --> $DIR/wrong-number-of-args.rs:125:22
    |
 LL |     type C = Box<dyn GenericLifetime<'static, 'static>>;
-   |                      ^^^^^^^^^^^^^^^          ------- help: remove this lifetime argument
-   |                      |
-   |                      expected 1 lifetime argument
+   |                      ^^^^^^^^^^^^^^^ expected 1 lifetime argument
    |
 note: trait defined here, with 1 lifetime parameter: `'a`
   --> $DIR/wrong-number-of-args.rs:108:11
    |
 LL |     trait GenericLifetime<'a> {
    |           ^^^^^^^^^^^^^^^ --
+help: remove this lifetime argument
+   |
+LL -     type C = Box<dyn GenericLifetime<'static, 'static>>;
+LL +     type C = Box<dyn GenericLifetime<'static, >>;
+   |
 
 error[E0107]: missing generics for trait `GenericType`
   --> $DIR/wrong-number-of-args.rs:129:22
@@ -489,15 +522,18 @@ error[E0107]: trait takes 1 generic argument but 2 generic arguments were suppli
   --> $DIR/wrong-number-of-args.rs:133:22
    |
 LL |     type E = Box<dyn GenericType<String, usize>>;
-   |                      ^^^^^^^^^^^         ----- help: remove this generic argument
-   |                      |
-   |                      expected 1 generic argument
+   |                      ^^^^^^^^^^^ expected 1 generic argument
    |
 note: trait defined here, with 1 generic parameter: `A`
   --> $DIR/wrong-number-of-args.rs:112:11
    |
 LL |     trait GenericType<A> {
    |           ^^^^^^^^^^^ -
+help: remove this generic argument
+   |
+LL -     type E = Box<dyn GenericType<String, usize>>;
+LL +     type E = Box<dyn GenericType<String, >>;
+   |
 
 error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:142:22
@@ -519,43 +555,52 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
   --> $DIR/wrong-number-of-args.rs:153:26
    |
 LL |         type A = Box<dyn NonGenericAT<usize, AssocTy=()>>;
-   |                          ^^^^^^^^^^^^------------------- help: remove these generics
-   |                          |
-   |                          expected 0 generic arguments
+   |                          ^^^^^^^^^^^^ expected 0 generic arguments
    |
 note: trait defined here, with 0 generic parameters
   --> $DIR/wrong-number-of-args.rs:149:15
    |
 LL |         trait NonGenericAT {
    |               ^^^^^^^^^^^^
+help: remove these generics
+   |
+LL -         type A = Box<dyn NonGenericAT<usize, AssocTy=()>>;
+LL +         type A = Box<dyn NonGenericAT>;
+   |
 
 error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied
   --> $DIR/wrong-number-of-args.rs:168:26
    |
 LL |         type B = Box<dyn GenericLifetimeAT<'static, 'static, AssocTy=()>>;
-   |                          ^^^^^^^^^^^^^^^^^          ------- help: remove this lifetime argument
-   |                          |
-   |                          expected 1 lifetime argument
+   |                          ^^^^^^^^^^^^^^^^^ expected 1 lifetime argument
    |
 note: trait defined here, with 1 lifetime parameter: `'a`
   --> $DIR/wrong-number-of-args.rs:159:15
    |
 LL |         trait GenericLifetimeAT<'a> {
    |               ^^^^^^^^^^^^^^^^^ --
+help: remove this lifetime argument
+   |
+LL -         type B = Box<dyn GenericLifetimeAT<'static, 'static, AssocTy=()>>;
+LL +         type B = Box<dyn GenericLifetimeAT<'static, , AssocTy=()>>;
+   |
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/wrong-number-of-args.rs:172:26
    |
 LL |         type C = Box<dyn GenericLifetimeAT<(), AssocTy=()>>;
-   |                          ^^^^^^^^^^^^^^^^^ -- help: remove this generic argument
-   |                          |
-   |                          expected 0 generic arguments
+   |                          ^^^^^^^^^^^^^^^^^ expected 0 generic arguments
    |
 note: trait defined here, with 0 generic parameters
   --> $DIR/wrong-number-of-args.rs:159:15
    |
 LL |         trait GenericLifetimeAT<'a> {
    |               ^^^^^^^^^^^^^^^^^
+help: remove this generic argument
+   |
+LL -         type C = Box<dyn GenericLifetimeAT<(), AssocTy=()>>;
+LL +         type C = Box<dyn GenericLifetimeAT<, AssocTy=()>>;
+   |
 
 error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:185:26
@@ -577,29 +622,35 @@ error[E0107]: trait takes 1 generic argument but 2 generic arguments were suppli
   --> $DIR/wrong-number-of-args.rs:189:26
    |
 LL |         type B = Box<dyn GenericTypeAT<(), (), AssocTy=()>>;
-   |                          ^^^^^^^^^^^^^     -- help: remove this generic argument
-   |                          |
-   |                          expected 1 generic argument
+   |                          ^^^^^^^^^^^^^ expected 1 generic argument
    |
 note: trait defined here, with 1 generic parameter: `A`
   --> $DIR/wrong-number-of-args.rs:181:15
    |
 LL |         trait GenericTypeAT<A> {
    |               ^^^^^^^^^^^^^ -
+help: remove this generic argument
+   |
+LL -         type B = Box<dyn GenericTypeAT<(), (), AssocTy=()>>;
+LL +         type B = Box<dyn GenericTypeAT<(), , AssocTy=()>>;
+   |
 
 error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/wrong-number-of-args.rs:193:26
    |
 LL |         type C = Box<dyn GenericTypeAT<'static, AssocTy=()>>;
-   |                          ^^^^^^^^^^^^^--------------------- help: remove these generics
-   |                          |
-   |                          expected 0 lifetime arguments
+   |                          ^^^^^^^^^^^^^ expected 0 lifetime arguments
    |
 note: trait defined here, with 0 lifetime parameters
   --> $DIR/wrong-number-of-args.rs:181:15
    |
 LL |         trait GenericTypeAT<A> {
    |               ^^^^^^^^^^^^^
+help: remove these generics
+   |
+LL -         type C = Box<dyn GenericTypeAT<'static, AssocTy=()>>;
+LL +         type C = Box<dyn GenericTypeAT>;
+   |
 
 error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:193:26
@@ -653,15 +704,18 @@ error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supp
   --> $DIR/wrong-number-of-args.rs:216:26
    |
 LL |         type C = Box<dyn GenericLifetimeTypeAT<'static, 'static, AssocTy=()>>;
-   |                          ^^^^^^^^^^^^^^^^^^^^^          ------- help: remove this lifetime argument
-   |                          |
-   |                          expected 1 lifetime argument
+   |                          ^^^^^^^^^^^^^^^^^^^^^ expected 1 lifetime argument
    |
 note: trait defined here, with 1 lifetime parameter: `'a`
   --> $DIR/wrong-number-of-args.rs:201:15
    |
 LL |         trait GenericLifetimeTypeAT<'a, A> {
    |               ^^^^^^^^^^^^^^^^^^^^^ --
+help: remove this lifetime argument
+   |
+LL -         type C = Box<dyn GenericLifetimeTypeAT<'static, 'static, AssocTy=()>>;
+LL +         type C = Box<dyn GenericLifetimeTypeAT<'static, , AssocTy=()>>;
+   |
 
 error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:216:26
@@ -683,71 +737,86 @@ error[E0107]: trait takes 1 generic argument but 2 generic arguments were suppli
   --> $DIR/wrong-number-of-args.rs:227:26
    |
 LL |         type E = Box<dyn GenericLifetimeTypeAT<(), (), AssocTy=()>>;
-   |                          ^^^^^^^^^^^^^^^^^^^^^     -- help: remove this generic argument
-   |                          |
-   |                          expected 1 generic argument
+   |                          ^^^^^^^^^^^^^^^^^^^^^ expected 1 generic argument
    |
 note: trait defined here, with 1 generic parameter: `A`
   --> $DIR/wrong-number-of-args.rs:201:15
    |
 LL |         trait GenericLifetimeTypeAT<'a, A> {
    |               ^^^^^^^^^^^^^^^^^^^^^     -
+help: remove this generic argument
+   |
+LL -         type E = Box<dyn GenericLifetimeTypeAT<(), (), AssocTy=()>>;
+LL +         type E = Box<dyn GenericLifetimeTypeAT<(), , AssocTy=()>>;
+   |
 
 error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied
   --> $DIR/wrong-number-of-args.rs:234:26
    |
 LL |         type F = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), AssocTy=()>>;
-   |                          ^^^^^^^^^^^^^^^^^^^^^          ------- help: remove this lifetime argument
-   |                          |
-   |                          expected 1 lifetime argument
+   |                          ^^^^^^^^^^^^^^^^^^^^^ expected 1 lifetime argument
    |
 note: trait defined here, with 1 lifetime parameter: `'a`
   --> $DIR/wrong-number-of-args.rs:201:15
    |
 LL |         trait GenericLifetimeTypeAT<'a, A> {
    |               ^^^^^^^^^^^^^^^^^^^^^ --
+help: remove this lifetime argument
+   |
+LL -         type F = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), AssocTy=()>>;
+LL +         type F = Box<dyn GenericLifetimeTypeAT<'static, , (), AssocTy=()>>;
+   |
 
 error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:238:26
    |
 LL |         type G = Box<dyn GenericLifetimeTypeAT<'static, (), (), AssocTy=()>>;
-   |                          ^^^^^^^^^^^^^^^^^^^^^              -- help: remove this generic argument
-   |                          |
-   |                          expected 1 generic argument
+   |                          ^^^^^^^^^^^^^^^^^^^^^ expected 1 generic argument
    |
 note: trait defined here, with 1 generic parameter: `A`
   --> $DIR/wrong-number-of-args.rs:201:15
    |
 LL |         trait GenericLifetimeTypeAT<'a, A> {
    |               ^^^^^^^^^^^^^^^^^^^^^     -
+help: remove this generic argument
+   |
+LL -         type G = Box<dyn GenericLifetimeTypeAT<'static, (), (), AssocTy=()>>;
+LL +         type G = Box<dyn GenericLifetimeTypeAT<'static, (), , AssocTy=()>>;
+   |
 
 error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied
   --> $DIR/wrong-number-of-args.rs:242:26
    |
 LL |         type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>;
-   |                          ^^^^^^^^^^^^^^^^^^^^^          ------- help: remove this lifetime argument
-   |                          |
-   |                          expected 1 lifetime argument
+   |                          ^^^^^^^^^^^^^^^^^^^^^ expected 1 lifetime argument
    |
 note: trait defined here, with 1 lifetime parameter: `'a`
   --> $DIR/wrong-number-of-args.rs:201:15
    |
 LL |         trait GenericLifetimeTypeAT<'a, A> {
    |               ^^^^^^^^^^^^^^^^^^^^^ --
+help: remove this lifetime argument
+   |
+LL -         type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>;
+LL +         type H = Box<dyn GenericLifetimeTypeAT<'static, , (), (), AssocTy=()>>;
+   |
 
 error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:242:26
    |
 LL |         type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>;
-   |                          ^^^^^^^^^^^^^^^^^^^^^                       -- help: remove this generic argument
-   |                          |
-   |                          expected 1 generic argument
+   |                          ^^^^^^^^^^^^^^^^^^^^^ expected 1 generic argument
    |
 note: trait defined here, with 1 generic parameter: `A`
   --> $DIR/wrong-number-of-args.rs:201:15
    |
 LL |         trait GenericLifetimeTypeAT<'a, A> {
    |               ^^^^^^^^^^^^^^^^^^^^^     -
+help: remove this generic argument
+   |
+LL -         type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>;
+LL +         type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), , AssocTy=()>>;
+   |
 
 error[E0107]: trait takes 2 generic arguments but 0 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:254:26
@@ -787,15 +856,18 @@ error[E0107]: trait takes 2 generic arguments but 3 generic arguments were suppl
   --> $DIR/wrong-number-of-args.rs:262:26
    |
 LL |         type C = Box<dyn GenericTypeTypeAT<(), (), (), AssocTy=()>>;
-   |                          ^^^^^^^^^^^^^^^^^         -- help: remove this generic argument
-   |                          |
-   |                          expected 2 generic arguments
+   |                          ^^^^^^^^^^^^^^^^^ expected 2 generic arguments
    |
 note: trait defined here, with 2 generic parameters: `A`, `B`
   --> $DIR/wrong-number-of-args.rs:250:15
    |
 LL |         trait GenericTypeTypeAT<A, B> {
    |               ^^^^^^^^^^^^^^^^^ -  -
+help: remove this generic argument
+   |
+LL -         type C = Box<dyn GenericTypeTypeAT<(), (), (), AssocTy=()>>;
+LL +         type C = Box<dyn GenericTypeTypeAT<(), (), , AssocTy=()>>;
+   |
 
 error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/wrong-number-of-args.rs:277:26
@@ -911,9 +983,13 @@ error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supp
   --> $DIR/wrong-number-of-args.rs:318:18
    |
 LL |         type C = HashMap<'static>;
-   |                  ^^^^^^^--------- help: remove these generics
-   |                  |
-   |                  expected 0 lifetime arguments
+   |                  ^^^^^^^ expected 0 lifetime arguments
+   |
+help: remove these generics
+   |
+LL -         type C = HashMap<'static>;
+LL +         type C = HashMap;
+   |
 
 error[E0107]: struct takes at least 2 generic arguments but 0 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:318:18
@@ -930,9 +1006,13 @@ error[E0107]: struct takes at most 3 generic arguments but 4 generic arguments w
   --> $DIR/wrong-number-of-args.rs:324:18
    |
 LL |         type D = HashMap<usize, String, char, f64>;
-   |                  ^^^^^^^                      --- help: remove this generic argument
-   |                  |
-   |                  expected at most 3 generic arguments
+   |                  ^^^^^^^ expected at most 3 generic arguments
+   |
+help: remove this generic argument
+   |
+LL -         type D = HashMap<usize, String, char, f64>;
+LL +         type D = HashMap<usize, String, char, >;
+   |
 
 error[E0107]: struct takes at least 2 generic arguments but 0 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:328:18
@@ -973,9 +1053,13 @@ error[E0107]: enum takes 0 lifetime arguments but 1 lifetime argument was suppli
   --> $DIR/wrong-number-of-args.rs:342:18
    |
 LL |         type C = Result<'static>;
-   |                  ^^^^^^--------- help: remove these generics
-   |                  |
-   |                  expected 0 lifetime arguments
+   |                  ^^^^^^ expected 0 lifetime arguments
+   |
+help: remove these generics
+   |
+LL -         type C = Result<'static>;
+LL +         type C = Result;
+   |
 
 error[E0107]: enum takes 2 generic arguments but 0 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:342:18
@@ -992,9 +1076,13 @@ error[E0107]: enum takes 2 generic arguments but 3 generic arguments were suppli
   --> $DIR/wrong-number-of-args.rs:348:18
    |
 LL |         type D = Result<usize, String, char>;
-   |                  ^^^^^^                ---- help: remove this generic argument
-   |                  |
-   |                  expected 2 generic arguments
+   |                  ^^^^^^ expected 2 generic arguments
+   |
+help: remove this generic argument
+   |
+LL -         type D = Result<usize, String, char>;
+LL +         type D = Result<usize, String, >;
+   |
 
 error[E0107]: enum takes 2 generic arguments but 0 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:352:18
diff --git a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr
index e8cd16bc301..d184110c453 100644
--- a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr
+++ b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr
@@ -2,9 +2,7 @@ error[E0107]: function takes 1 generic argument but 2 generic arguments were sup
   --> $DIR/explicit-generic-args-for-impl.rs:4:5
    |
 LL |     foo::<str, String>("".to_string());
-   |     ^^^        ------ help: remove this generic argument
-   |     |
-   |     expected 1 generic argument
+   |     ^^^ expected 1 generic argument
    |
 note: function defined here, with 1 generic parameter: `T`
   --> $DIR/explicit-generic-args-for-impl.rs:1:4
@@ -12,6 +10,11 @@ note: function defined here, with 1 generic parameter: `T`
 LL | fn foo<T: ?Sized>(_f: impl AsRef<T>) {}
    |    ^^^ -
    = note: `impl Trait` cannot be explicitly specified as a generic argument
+help: remove this generic argument
+   |
+LL -     foo::<str, String>("".to_string());
+LL +     foo::<str, >("".to_string());
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/impl-trait/in-trait/opaque-and-lifetime-mismatch.stderr b/tests/ui/impl-trait/in-trait/opaque-and-lifetime-mismatch.stderr
index 1f8a0d5edd7..aba82084f22 100644
--- a/tests/ui/impl-trait/in-trait/opaque-and-lifetime-mismatch.stderr
+++ b/tests/ui/impl-trait/in-trait/opaque-and-lifetime-mismatch.stderr
@@ -38,29 +38,35 @@ error[E0107]: struct takes 0 generic arguments but 1 generic argument was suppli
   --> $DIR/opaque-and-lifetime-mismatch.rs:4:17
    |
 LL |     fn bar() -> Wrapper<impl Sized>;
-   |                 ^^^^^^^ ---------- help: remove this generic argument
-   |                 |
-   |                 expected 0 generic arguments
+   |                 ^^^^^^^ expected 0 generic arguments
    |
 note: struct defined here, with 0 generic parameters
   --> $DIR/opaque-and-lifetime-mismatch.rs:1:8
    |
 LL | struct Wrapper<'rom>(&'rom ());
    |        ^^^^^^^
+help: remove this generic argument
+   |
+LL -     fn bar() -> Wrapper<impl Sized>;
+LL +     fn bar() -> Wrapper<>;
+   |
 
 error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/opaque-and-lifetime-mismatch.rs:18:17
    |
 LL |     fn foo() -> Wrapper<impl Sized>;
-   |                 ^^^^^^^ ---------- help: remove this generic argument
-   |                 |
-   |                 expected 0 generic arguments
+   |                 ^^^^^^^ expected 0 generic arguments
    |
 note: struct defined here, with 0 generic parameters
   --> $DIR/opaque-and-lifetime-mismatch.rs:1:8
    |
 LL | struct Wrapper<'rom>(&'rom ());
    |        ^^^^^^^
+help: remove this generic argument
+   |
+LL -     fn foo() -> Wrapper<impl Sized>;
+LL +     fn foo() -> Wrapper<>;
+   |
 
 error[E0053]: method `bar` has an incompatible return type for trait
   --> $DIR/opaque-and-lifetime-mismatch.rs:10:17
@@ -93,15 +99,18 @@ error[E0107]: struct takes 0 generic arguments but 1 generic argument was suppli
   --> $DIR/opaque-and-lifetime-mismatch.rs:24:17
    |
 LL |     fn foo() -> Wrapper<impl Sized> {
-   |                 ^^^^^^^ ---------- help: remove this generic argument
-   |                 |
-   |                 expected 0 generic arguments
+   |                 ^^^^^^^ expected 0 generic arguments
    |
 note: struct defined here, with 0 generic parameters
   --> $DIR/opaque-and-lifetime-mismatch.rs:1:8
    |
 LL | struct Wrapper<'rom>(&'rom ());
    |        ^^^^^^^
+help: remove this generic argument
+   |
+LL -     fn foo() -> Wrapper<impl Sized> {
+LL +     fn foo() -> Wrapper<> {
+   |
 
 error: aborting due to 8 previous errors
 
diff --git a/tests/ui/issues/issue-18423.stderr b/tests/ui/issues/issue-18423.stderr
index 2c6015eaa9d..a73688205ac 100644
--- a/tests/ui/issues/issue-18423.stderr
+++ b/tests/ui/issues/issue-18423.stderr
@@ -2,9 +2,13 @@ error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supp
   --> $DIR/issue-18423.rs:4:8
    |
 LL |     x: Box<'a, isize>
-   |        ^^^ -- help: remove this lifetime argument
-   |        |
-   |        expected 0 lifetime arguments
+   |        ^^^ expected 0 lifetime arguments
+   |
+help: remove this lifetime argument
+   |
+LL -     x: Box<'a, isize>
+LL +     x: Box<, isize>
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/issues/issue-53251.stderr b/tests/ui/issues/issue-53251.stderr
index 05ea6311589..db9df7d911c 100644
--- a/tests/ui/issues/issue-53251.stderr
+++ b/tests/ui/issues/issue-53251.stderr
@@ -2,9 +2,7 @@ error[E0107]: associated function takes 0 generic arguments but 1 generic argume
   --> $DIR/issue-53251.rs:11:20
    |
 LL |                 S::f::<i64>();
-   |                    ^------- help: remove these generics
-   |                    |
-   |                    expected 0 generic arguments
+   |                    ^ expected 0 generic arguments
 ...
 LL | impl_add!(a b);
    | -------------- in this macro invocation
@@ -15,14 +13,17 @@ note: associated function defined here, with 0 generic parameters
 LL |     fn f() {}
    |        ^
    = note: this error originates in the macro `impl_add` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: remove these generics
+   |
+LL -                 S::f::<i64>();
+LL +                 S::f();
+   |
 
 error[E0107]: associated function takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/issue-53251.rs:11:20
    |
 LL |                 S::f::<i64>();
-   |                    ^------- help: remove these generics
-   |                    |
-   |                    expected 0 generic arguments
+   |                    ^ expected 0 generic arguments
 ...
 LL | impl_add!(a b);
    | -------------- in this macro invocation
@@ -34,6 +35,11 @@ LL |     fn f() {}
    |        ^
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
    = note: this error originates in the macro `impl_add` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: remove these generics
+   |
+LL -                 S::f::<i64>();
+LL +                 S::f();
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/issues/issue-60622.stderr b/tests/ui/issues/issue-60622.stderr
index 43da2773940..e694a92213c 100644
--- a/tests/ui/issues/issue-60622.stderr
+++ b/tests/ui/issues/issue-60622.stderr
@@ -20,15 +20,18 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli
   --> $DIR/issue-60622.rs:10:7
    |
 LL |     b.a::<'_, T>();
-   |       ^       - help: remove this generic argument
-   |       |
-   |       expected 0 generic arguments
+   |       ^ expected 0 generic arguments
    |
 note: method defined here, with 0 generic parameters
   --> $DIR/issue-60622.rs:6:8
    |
 LL |     fn a(&self) {}
    |        ^
+help: remove this generic argument
+   |
+LL -     b.a::<'_, T>();
+LL +     b.a::<'_, >();
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/late-bound-lifetimes/mismatched_arg_count.stderr b/tests/ui/late-bound-lifetimes/mismatched_arg_count.stderr
index 1b8f1c3fd6f..de0a0631bf8 100644
--- a/tests/ui/late-bound-lifetimes/mismatched_arg_count.stderr
+++ b/tests/ui/late-bound-lifetimes/mismatched_arg_count.stderr
@@ -2,15 +2,18 @@ error[E0107]: type alias takes 1 lifetime argument but 2 lifetime arguments were
   --> $DIR/mismatched_arg_count.rs:9:29
    |
 LL | fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {}
-   |                             ^^^^^     -- help: remove this lifetime argument
-   |                             |
-   |                             expected 1 lifetime argument
+   |                             ^^^^^ expected 1 lifetime argument
    |
 note: type alias defined here, with 1 lifetime parameter: `'a`
   --> $DIR/mismatched_arg_count.rs:7:6
    |
 LL | type Alias<'a, T> = <T as Trait<'a>>::Assoc;
    |      ^^^^^ --
+help: remove this lifetime argument
+   |
+LL - fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {}
+LL + fn bar<'a, T: Trait<'a>>(_: Alias<'a, , T>) {}
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/lifetimes/noisy-follow-up-erro.stderr b/tests/ui/lifetimes/noisy-follow-up-erro.stderr
index f549009a87c..38465c7ac96 100644
--- a/tests/ui/lifetimes/noisy-follow-up-erro.stderr
+++ b/tests/ui/lifetimes/noisy-follow-up-erro.stderr
@@ -2,15 +2,18 @@ error[E0107]: struct takes 2 lifetime arguments but 3 lifetime arguments were su
   --> $DIR/noisy-follow-up-erro.rs:12:30
    |
 LL |     fn boom(&self, foo: &mut Foo<'_, '_, 'a>) -> Result<(), &'a ()> {
-   |                              ^^^         -- help: remove this lifetime argument
-   |                              |
-   |                              expected 2 lifetime arguments
+   |                              ^^^ expected 2 lifetime arguments
    |
 note: struct defined here, with 2 lifetime parameters: `'c`, `'d`
   --> $DIR/noisy-follow-up-erro.rs:1:8
    |
 LL | struct Foo<'c, 'd>(&'c (), &'d ());
    |        ^^^ --  --
+help: remove this lifetime argument
+   |
+LL -     fn boom(&self, foo: &mut Foo<'_, '_, 'a>) -> Result<(), &'a ()> {
+LL +     fn boom(&self, foo: &mut Foo<'_, '_, >) -> Result<(), &'a ()> {
+   |
 
 error[E0621]: explicit lifetime required in the type of `foo`
   --> $DIR/noisy-follow-up-erro.rs:14:9
diff --git a/tests/ui/methods/method-call-lifetime-args-fail.stderr b/tests/ui/methods/method-call-lifetime-args-fail.stderr
index 645d8b8d14a..d431e0721cc 100644
--- a/tests/ui/methods/method-call-lifetime-args-fail.stderr
+++ b/tests/ui/methods/method-call-lifetime-args-fail.stderr
@@ -20,15 +20,18 @@ error[E0107]: method takes 2 lifetime arguments but 3 lifetime arguments were su
   --> $DIR/method-call-lifetime-args-fail.rs:18:7
    |
 LL |     S.early::<'static, 'static, 'static>();
-   |       ^^^^^                     ------- help: remove this lifetime argument
-   |       |
-   |       expected 2 lifetime arguments
+   |       ^^^^^ expected 2 lifetime arguments
    |
 note: method defined here, with 2 lifetime parameters: `'a`, `'b`
   --> $DIR/method-call-lifetime-args-fail.rs:6:8
    |
 LL |     fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} }
    |        ^^^^^ --  --
+help: remove this lifetime argument
+   |
+LL -     S.early::<'static, 'static, 'static>();
+LL +     S.early::<'static, 'static, >();
+   |
 
 error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
   --> $DIR/method-call-lifetime-args-fail.rs:27:15
@@ -220,15 +223,18 @@ error[E0107]: method takes 2 lifetime arguments but 3 lifetime arguments were su
   --> $DIR/method-call-lifetime-args-fail.rs:65:8
    |
 LL |     S::early::<'static, 'static, 'static>(S);
-   |        ^^^^^                     ------- help: remove this lifetime argument
-   |        |
-   |        expected 2 lifetime arguments
+   |        ^^^^^ expected 2 lifetime arguments
    |
 note: method defined here, with 2 lifetime parameters: `'a`, `'b`
   --> $DIR/method-call-lifetime-args-fail.rs:6:8
    |
 LL |     fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} }
    |        ^^^^^ --  --
+help: remove this lifetime argument
+   |
+LL -     S::early::<'static, 'static, 'static>(S);
+LL +     S::early::<'static, 'static, >(S);
+   |
 
 error: aborting due to 18 previous errors
 
diff --git a/tests/ui/resolve/issue-3214.stderr b/tests/ui/resolve/issue-3214.stderr
index 5b57c1baf90..614d3b21ff2 100644
--- a/tests/ui/resolve/issue-3214.stderr
+++ b/tests/ui/resolve/issue-3214.stderr
@@ -12,15 +12,18 @@ error[E0107]: struct takes 0 generic arguments but 1 generic argument was suppli
   --> $DIR/issue-3214.rs:6:22
    |
 LL |     impl<T> Drop for Foo<T> {
-   |                      ^^^--- help: remove these generics
-   |                      |
-   |                      expected 0 generic arguments
+   |                      ^^^ expected 0 generic arguments
    |
 note: struct defined here, with 0 generic parameters
   --> $DIR/issue-3214.rs:2:12
    |
 LL |     struct Foo {
    |            ^^^
+help: remove these generics
+   |
+LL -     impl<T> Drop for Foo<T> {
+LL +     impl<T> Drop for Foo {
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.stderr
index fa2e3da368b..3d9df78b196 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.stderr
@@ -2,15 +2,18 @@ error[E0107]: function takes 0 generic arguments but 1 generic argument was supp
   --> $DIR/no-explicit-const-params-cross-crate.rs:14:5
    |
 LL |     foo::<false>();
-   |     ^^^--------- help: remove these generics
-   |     |
-   |     expected 0 generic arguments
+   |     ^^^ expected 0 generic arguments
    |
 note: function defined here, with 0 generic parameters
   --> $DIR/auxiliary/cross-crate.rs:5:14
    |
 LL | pub const fn foo() {}
    |              ^^^
+help: remove these generics
+   |
+LL -     foo::<false>();
+LL +     foo();
+   |
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/no-explicit-const-params-cross-crate.rs:16:12
@@ -32,15 +35,18 @@ error[E0107]: function takes 0 generic arguments but 1 generic argument was supp
   --> $DIR/no-explicit-const-params-cross-crate.rs:7:5
    |
 LL |     foo::<true>();
-   |     ^^^-------- help: remove these generics
-   |     |
-   |     expected 0 generic arguments
+   |     ^^^ expected 0 generic arguments
    |
 note: function defined here, with 0 generic parameters
   --> $DIR/auxiliary/cross-crate.rs:5:14
    |
 LL | pub const fn foo() {}
    |              ^^^
+help: remove these generics
+   |
+LL -     foo::<true>();
+LL +     foo();
+   |
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/no-explicit-const-params-cross-crate.rs:9:12
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.stderr
index fbb96dfd85e..8412a3d0a8a 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.stderr
@@ -16,15 +16,18 @@ error[E0107]: function takes 0 generic arguments but 1 generic argument was supp
   --> $DIR/no-explicit-const-params.rs:22:5
    |
 LL |     foo::<false>();
-   |     ^^^--------- help: remove these generics
-   |     |
-   |     expected 0 generic arguments
+   |     ^^^ expected 0 generic arguments
    |
 note: function defined here, with 0 generic parameters
   --> $DIR/no-explicit-const-params.rs:3:10
    |
 LL | const fn foo() {}
    |          ^^^
+help: remove these generics
+   |
+LL -     foo::<false>();
+LL +     foo();
+   |
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/no-explicit-const-params.rs:24:12
@@ -55,15 +58,18 @@ error[E0107]: function takes 0 generic arguments but 1 generic argument was supp
   --> $DIR/no-explicit-const-params.rs:15:5
    |
 LL |     foo::<true>();
-   |     ^^^-------- help: remove these generics
-   |     |
-   |     expected 0 generic arguments
+   |     ^^^ expected 0 generic arguments
    |
 note: function defined here, with 0 generic parameters
   --> $DIR/no-explicit-const-params.rs:3:10
    |
 LL | const fn foo() {}
    |          ^^^
+help: remove these generics
+   |
+LL -     foo::<true>();
+LL +     foo();
+   |
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/no-explicit-const-params.rs:17:12
diff --git a/tests/ui/seq-args.stderr b/tests/ui/seq-args.stderr
index a5b0f8e98dc..bb46a11d902 100644
--- a/tests/ui/seq-args.stderr
+++ b/tests/ui/seq-args.stderr
@@ -2,29 +2,35 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
   --> $DIR/seq-args.rs:4:13
    |
 LL |     impl<T> Seq<T> for Vec<T> {
-   |             ^^^--- help: remove these generics
-   |             |
-   |             expected 0 generic arguments
+   |             ^^^ expected 0 generic arguments
    |
 note: trait defined here, with 0 generic parameters
   --> $DIR/seq-args.rs:2:11
    |
 LL |     trait Seq { }
    |           ^^^
+help: remove these generics
+   |
+LL -     impl<T> Seq<T> for Vec<T> {
+LL +     impl<T> Seq for Vec<T> {
+   |
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/seq-args.rs:9:10
    |
 LL |     impl Seq<bool> for u32 {
-   |          ^^^------ help: remove these generics
-   |          |
-   |          expected 0 generic arguments
+   |          ^^^ expected 0 generic arguments
    |
 note: trait defined here, with 0 generic parameters
   --> $DIR/seq-args.rs:2:11
    |
 LL |     trait Seq { }
    |           ^^^
+help: remove these generics
+   |
+LL -     impl Seq<bool> for u32 {
+LL +     impl Seq for u32 {
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/structs/struct-path-associated-type.stderr b/tests/ui/structs/struct-path-associated-type.stderr
index 0c9d2aad5d8..edcb0bcc833 100644
--- a/tests/ui/structs/struct-path-associated-type.stderr
+++ b/tests/ui/structs/struct-path-associated-type.stderr
@@ -8,15 +8,18 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
   --> $DIR/struct-path-associated-type.rs:14:16
    |
 LL |     let z = T::A::<u8> {};
-   |                ^------ help: remove these generics
-   |                |
-   |                expected 0 generic arguments
+   |                ^ expected 0 generic arguments
    |
 note: associated type defined here, with 0 generic parameters
   --> $DIR/struct-path-associated-type.rs:4:10
    |
 LL |     type A;
    |          ^
+help: remove these generics
+   |
+LL -     let z = T::A::<u8> {};
+LL +     let z = T::A {};
+   |
 
 error[E0071]: expected struct, variant or union type, found associated type
   --> $DIR/struct-path-associated-type.rs:14:13
@@ -34,15 +37,18 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
   --> $DIR/struct-path-associated-type.rs:25:16
    |
 LL |     let z = T::A::<u8> {};
-   |                ^------ help: remove these generics
-   |                |
-   |                expected 0 generic arguments
+   |                ^ expected 0 generic arguments
    |
 note: associated type defined here, with 0 generic parameters
   --> $DIR/struct-path-associated-type.rs:4:10
    |
 LL |     type A;
    |          ^
+help: remove these generics
+   |
+LL -     let z = T::A::<u8> {};
+LL +     let z = T::A {};
+   |
 
 error[E0223]: ambiguous associated type
   --> $DIR/struct-path-associated-type.rs:32:13
diff --git a/tests/ui/structs/structure-constructor-type-mismatch.stderr b/tests/ui/structs/structure-constructor-type-mismatch.stderr
index cb957487347..50ebd86a216 100644
--- a/tests/ui/structs/structure-constructor-type-mismatch.stderr
+++ b/tests/ui/structs/structure-constructor-type-mismatch.stderr
@@ -68,15 +68,18 @@ error[E0107]: type alias takes 0 generic arguments but 1 generic argument was su
   --> $DIR/structure-constructor-type-mismatch.rs:48:15
    |
 LL |     let pt3 = PointF::<i32> {
-   |               ^^^^^^------- help: remove these generics
-   |               |
-   |               expected 0 generic arguments
+   |               ^^^^^^ expected 0 generic arguments
    |
 note: type alias defined here, with 0 generic parameters
   --> $DIR/structure-constructor-type-mismatch.rs:6:6
    |
 LL | type PointF = Point<f32>;
    |      ^^^^^^
+help: remove these generics
+   |
+LL -     let pt3 = PointF::<i32> {
+LL +     let pt3 = PointF {
+   |
 
 error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:49:12
@@ -104,15 +107,18 @@ error[E0107]: type alias takes 0 generic arguments but 1 generic argument was su
   --> $DIR/structure-constructor-type-mismatch.rs:54:9
    |
 LL |         PointF::<u32> { .. } => {}
-   |         ^^^^^^------- help: remove these generics
-   |         |
-   |         expected 0 generic arguments
+   |         ^^^^^^ expected 0 generic arguments
    |
 note: type alias defined here, with 0 generic parameters
   --> $DIR/structure-constructor-type-mismatch.rs:6:6
    |
 LL | type PointF = Point<f32>;
    |      ^^^^^^
+help: remove these generics
+   |
+LL -         PointF::<u32> { .. } => {}
+LL +         PointF { .. } => {}
+   |
 
 error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:54:9
diff --git a/tests/ui/suggestions/issue-101421.stderr b/tests/ui/suggestions/issue-101421.stderr
index ececba5fb1b..1a64f5313cf 100644
--- a/tests/ui/suggestions/issue-101421.stderr
+++ b/tests/ui/suggestions/issue-101421.stderr
@@ -2,15 +2,18 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli
   --> $DIR/issue-101421.rs:10:8
    |
 LL |     ().f::<()>(());
-   |        ^------ help: remove these generics
-   |        |
-   |        expected 0 generic arguments
+   |        ^ expected 0 generic arguments
    |
 note: method defined here, with 0 generic parameters
   --> $DIR/issue-101421.rs:2:8
    |
 LL |     fn f(&self, _: ());
    |        ^
+help: remove these generics
+   |
+LL -     ().f::<()>(());
+LL +     ().f(());
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/suggestions/issue-104287.stderr b/tests/ui/suggestions/issue-104287.stderr
index ed59b2e7a2d..b65d3ad4d31 100644
--- a/tests/ui/suggestions/issue-104287.stderr
+++ b/tests/ui/suggestions/issue-104287.stderr
@@ -2,15 +2,18 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli
   --> $DIR/issue-104287.rs:10:5
    |
 LL |     foo::<()>(x);
-   |     ^^^------ help: remove these generics
-   |     |
-   |     expected 0 generic arguments
+   |     ^^^ expected 0 generic arguments
    |
 note: method defined here, with 0 generic parameters
   --> $DIR/issue-104287.rs:6:8
    |
 LL |     fn foo(&self) {}
    |        ^^^
+help: remove these generics
+   |
+LL -     foo::<()>(x);
+LL +     foo(x);
+   |
 
 error[E0425]: cannot find function `foo` in this scope
   --> $DIR/issue-104287.rs:10:5
diff --git a/tests/ui/suggestions/issue-89064.stderr b/tests/ui/suggestions/issue-89064.stderr
index be09dd89512..f1bb3c2adc7 100644
--- a/tests/ui/suggestions/issue-89064.stderr
+++ b/tests/ui/suggestions/issue-89064.stderr
@@ -46,15 +46,18 @@ error[E0107]: associated function takes 0 generic arguments but 1 generic argume
   --> $DIR/issue-89064.rs:27:21
    |
 LL |     let _ = A::<S>::foo::<S>();
-   |                     ^^^----- help: remove these generics
-   |                     |
-   |                     expected 0 generic arguments
+   |                     ^^^ expected 0 generic arguments
    |
 note: associated function defined here, with 0 generic parameters
   --> $DIR/issue-89064.rs:4:8
    |
 LL |     fn foo() {}
    |        ^^^
+help: remove these generics
+   |
+LL -     let _ = A::<S>::foo::<S>();
+LL +     let _ = A::<S>::foo();
+   |
 
 error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/issue-89064.rs:31:16
diff --git a/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr b/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr
index 06e2fa5d4d1..9193faeb1aa 100644
--- a/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr
+++ b/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr
@@ -117,15 +117,18 @@ error[E0107]: struct takes 1 generic argument but 2 generic arguments were suppl
   --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:40:58
    |
 LL | impl<T: Trait<u32, Assoc=String>, U> YetAnotherTrait for Struct<T, U> {}
-   |                                                          ^^^^^^    - help: remove this generic argument
-   |                                                          |
-   |                                                          expected 1 generic argument
+   |                                                          ^^^^^^ expected 1 generic argument
    |
 note: struct defined here, with 1 generic parameter: `T`
   --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:26:8
    |
 LL | struct Struct<T: Trait<u32, String>> {
    |        ^^^^^^ -
+help: remove this generic argument
+   |
+LL - impl<T: Trait<u32, Assoc=String>, U> YetAnotherTrait for Struct<T, U> {}
+LL + impl<T: Trait<u32, Assoc=String>, U> YetAnotherTrait for Struct<T, > {}
+   |
 
 error: aborting due to 9 previous errors
 
diff --git a/tests/ui/traits/object/vs-lifetime.stderr b/tests/ui/traits/object/vs-lifetime.stderr
index a69cd140807..aab4845a274 100644
--- a/tests/ui/traits/object/vs-lifetime.stderr
+++ b/tests/ui/traits/object/vs-lifetime.stderr
@@ -8,15 +8,18 @@ error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were sup
   --> $DIR/vs-lifetime.rs:11:12
    |
 LL |     let _: S<'static, 'static>;
-   |            ^          ------- help: remove this lifetime argument
-   |            |
-   |            expected 1 lifetime argument
+   |            ^ expected 1 lifetime argument
    |
 note: struct defined here, with 1 lifetime parameter: `'a`
   --> $DIR/vs-lifetime.rs:4:8
    |
 LL | struct S<'a, T>(&'a u8, T);
    |        ^ --
+help: remove this lifetime argument
+   |
+LL -     let _: S<'static, 'static>;
+LL +     let _: S<'static, >;
+   |
 
 error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
   --> $DIR/vs-lifetime.rs:11:12
diff --git a/tests/ui/traits/test-2.stderr b/tests/ui/traits/test-2.stderr
index 3972e539776..9916cf97fca 100644
--- a/tests/ui/traits/test-2.stderr
+++ b/tests/ui/traits/test-2.stderr
@@ -2,29 +2,35 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli
   --> $DIR/test-2.rs:9:8
    |
 LL |     10.dup::<i32>();
-   |        ^^^------- help: remove these generics
-   |        |
-   |        expected 0 generic arguments
+   |        ^^^ expected 0 generic arguments
    |
 note: method defined here, with 0 generic parameters
   --> $DIR/test-2.rs:4:16
    |
 LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
    |                ^^^
+help: remove these generics
+   |
+LL -     10.dup::<i32>();
+LL +     10.dup();
+   |
 
 error[E0107]: method takes 1 generic argument but 2 generic arguments were supplied
   --> $DIR/test-2.rs:11:8
    |
 LL |     10.blah::<i32, i32>();
-   |        ^^^^        --- help: remove this generic argument
-   |        |
-   |        expected 1 generic argument
+   |        ^^^^ expected 1 generic argument
    |
 note: method defined here, with 1 generic parameter: `X`
   --> $DIR/test-2.rs:4:39
    |
 LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
    |                                       ^^^^ -
+help: remove this generic argument
+   |
+LL -     10.blah::<i32, i32>();
+LL +     10.blah::<i32, >();
+   |
 
 error[E0038]: the trait `bar` cannot be made into an object
   --> $DIR/test-2.rs:13:22
diff --git a/tests/ui/transmutability/issue-101739-2.stderr b/tests/ui/transmutability/issue-101739-2.stderr
index 519a374dc22..93323049760 100644
--- a/tests/ui/transmutability/issue-101739-2.stderr
+++ b/tests/ui/transmutability/issue-101739-2.stderr
@@ -1,13 +1,16 @@
 error[E0107]: trait takes at most 2 generic arguments but 5 generic arguments were supplied
   --> $DIR/issue-101739-2.rs:17:14
    |
-LL |           Dst: BikeshedIntrinsicFrom<
-   |                ^^^^^^^^^^^^^^^^^^^^^ expected at most 2 generic arguments
-...
-LL | /             ASSUME_LIFETIMES,
-LL | |             ASSUME_VALIDITY,
-LL | |             ASSUME_VISIBILITY,
-   | |_____________________________- help: remove these generic arguments
+LL |         Dst: BikeshedIntrinsicFrom<
+   |              ^^^^^^^^^^^^^^^^^^^^^ expected at most 2 generic arguments
+   |
+help: remove these generic arguments
+   |
+LL -             ASSUME_LIFETIMES,
+LL -             ASSUME_VALIDITY,
+LL -             ASSUME_VISIBILITY,
+LL +             ,
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/type-alias-enum-variants/enum-variant-generic-args.stderr b/tests/ui/type-alias-enum-variants/enum-variant-generic-args.stderr
index 96a5c132763..a2dd6805f3d 100644
--- a/tests/ui/type-alias-enum-variants/enum-variant-generic-args.stderr
+++ b/tests/ui/type-alias-enum-variants/enum-variant-generic-args.stderr
@@ -308,29 +308,35 @@ error[E0107]: type alias takes 0 generic arguments but 1 generic argument was su
   --> $DIR/enum-variant-generic-args.rs:64:5
    |
 LL |     AliasFixed::<()>::TSVariant(());
-   |     ^^^^^^^^^^------ help: remove these generics
-   |     |
-   |     expected 0 generic arguments
+   |     ^^^^^^^^^^ expected 0 generic arguments
    |
 note: type alias defined here, with 0 generic parameters
   --> $DIR/enum-variant-generic-args.rs:9:6
    |
 LL | type AliasFixed = Enum<()>;
    |      ^^^^^^^^^^
+help: remove these generics
+   |
+LL -     AliasFixed::<()>::TSVariant(());
+LL +     AliasFixed::TSVariant(());
+   |
 
 error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/enum-variant-generic-args.rs:66:5
    |
 LL |     AliasFixed::<()>::TSVariant::<()>(());
-   |     ^^^^^^^^^^------ help: remove these generics
-   |     |
-   |     expected 0 generic arguments
+   |     ^^^^^^^^^^ expected 0 generic arguments
    |
 note: type alias defined here, with 0 generic parameters
   --> $DIR/enum-variant-generic-args.rs:9:6
    |
 LL | type AliasFixed = Enum<()>;
    |      ^^^^^^^^^^
+help: remove these generics
+   |
+LL -     AliasFixed::<()>::TSVariant::<()>(());
+LL +     AliasFixed::TSVariant::<()>(());
+   |
 
 error[E0109]: type arguments are not allowed on this type
   --> $DIR/enum-variant-generic-args.rs:66:35
@@ -399,29 +405,35 @@ error[E0107]: type alias takes 0 generic arguments but 1 generic argument was su
   --> $DIR/enum-variant-generic-args.rs:82:5
    |
 LL |     AliasFixed::<()>::SVariant { v: () };
-   |     ^^^^^^^^^^------ help: remove these generics
-   |     |
-   |     expected 0 generic arguments
+   |     ^^^^^^^^^^ expected 0 generic arguments
    |
 note: type alias defined here, with 0 generic parameters
   --> $DIR/enum-variant-generic-args.rs:9:6
    |
 LL | type AliasFixed = Enum<()>;
    |      ^^^^^^^^^^
+help: remove these generics
+   |
+LL -     AliasFixed::<()>::SVariant { v: () };
+LL +     AliasFixed::SVariant { v: () };
+   |
 
 error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/enum-variant-generic-args.rs:84:5
    |
 LL |     AliasFixed::<()>::SVariant::<()> { v: () };
-   |     ^^^^^^^^^^------ help: remove these generics
-   |     |
-   |     expected 0 generic arguments
+   |     ^^^^^^^^^^ expected 0 generic arguments
    |
 note: type alias defined here, with 0 generic parameters
   --> $DIR/enum-variant-generic-args.rs:9:6
    |
 LL | type AliasFixed = Enum<()>;
    |      ^^^^^^^^^^
+help: remove these generics
+   |
+LL -     AliasFixed::<()>::SVariant::<()> { v: () };
+LL +     AliasFixed::SVariant::<()> { v: () };
+   |
 
 error[E0109]: type arguments are not allowed on this type
   --> $DIR/enum-variant-generic-args.rs:84:34
@@ -474,29 +486,35 @@ error[E0107]: type alias takes 0 generic arguments but 1 generic argument was su
   --> $DIR/enum-variant-generic-args.rs:100:5
    |
 LL |     AliasFixed::<()>::UVariant;
-   |     ^^^^^^^^^^------ help: remove these generics
-   |     |
-   |     expected 0 generic arguments
+   |     ^^^^^^^^^^ expected 0 generic arguments
    |
 note: type alias defined here, with 0 generic parameters
   --> $DIR/enum-variant-generic-args.rs:9:6
    |
 LL | type AliasFixed = Enum<()>;
    |      ^^^^^^^^^^
+help: remove these generics
+   |
+LL -     AliasFixed::<()>::UVariant;
+LL +     AliasFixed::UVariant;
+   |
 
 error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/enum-variant-generic-args.rs:102:5
    |
 LL |     AliasFixed::<()>::UVariant::<()>;
-   |     ^^^^^^^^^^------ help: remove these generics
-   |     |
-   |     expected 0 generic arguments
+   |     ^^^^^^^^^^ expected 0 generic arguments
    |
 note: type alias defined here, with 0 generic parameters
   --> $DIR/enum-variant-generic-args.rs:9:6
    |
 LL | type AliasFixed = Enum<()>;
    |      ^^^^^^^^^^
+help: remove these generics
+   |
+LL -     AliasFixed::<()>::UVariant::<()>;
+LL +     AliasFixed::UVariant::<()>;
+   |
 
 error[E0109]: type arguments are not allowed on this type
   --> $DIR/enum-variant-generic-args.rs:102:34
diff --git a/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr b/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr
index 9a9b2a68dbe..3be83682ec9 100644
--- a/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr
+++ b/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr
@@ -2,69 +2,99 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
   --> $DIR/typeck-builtin-bound-type-parameters.rs:1:11
    |
 LL | fn foo1<T:Copy<U>, U>(x: T) {}
-   |           ^^^^--- help: remove these generics
-   |           |
-   |           expected 0 generic arguments
+   |           ^^^^ expected 0 generic arguments
+   |
+help: remove these generics
+   |
+LL - fn foo1<T:Copy<U>, U>(x: T) {}
+LL + fn foo1<T:Copy, U>(x: T) {}
+   |
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/typeck-builtin-bound-type-parameters.rs:4:14
    |
 LL | trait Trait: Copy<dyn Send> {}
-   |              ^^^^---------- help: remove these generics
-   |              |
-   |              expected 0 generic arguments
+   |              ^^^^ expected 0 generic arguments
+   |
+help: remove these generics
+   |
+LL - trait Trait: Copy<dyn Send> {}
+LL + trait Trait: Copy {}
+   |
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/typeck-builtin-bound-type-parameters.rs:4:14
    |
 LL | trait Trait: Copy<dyn Send> {}
-   |              ^^^^---------- help: remove these generics
-   |              |
-   |              expected 0 generic arguments
+   |              ^^^^ expected 0 generic arguments
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: remove these generics
+   |
+LL - trait Trait: Copy<dyn Send> {}
+LL + trait Trait: Copy {}
+   |
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/typeck-builtin-bound-type-parameters.rs:4:14
    |
 LL | trait Trait: Copy<dyn Send> {}
-   |              ^^^^---------- help: remove these generics
-   |              |
-   |              expected 0 generic arguments
+   |              ^^^^ expected 0 generic arguments
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: remove these generics
+   |
+LL - trait Trait: Copy<dyn Send> {}
+LL + trait Trait: Copy {}
+   |
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/typeck-builtin-bound-type-parameters.rs:9:21
    |
 LL | struct MyStruct1<T: Copy<T>>(T);
-   |                     ^^^^--- help: remove these generics
-   |                     |
-   |                     expected 0 generic arguments
+   |                     ^^^^ expected 0 generic arguments
+   |
+help: remove these generics
+   |
+LL - struct MyStruct1<T: Copy<T>>(T);
+LL + struct MyStruct1<T: Copy>(T);
+   |
 
 error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/typeck-builtin-bound-type-parameters.rs:12:25
    |
 LL | struct MyStruct2<'a, T: Copy<'a>>(&'a T);
-   |                         ^^^^---- help: remove these generics
-   |                         |
-   |                         expected 0 lifetime arguments
+   |                         ^^^^ expected 0 lifetime arguments
+   |
+help: remove these generics
+   |
+LL - struct MyStruct2<'a, T: Copy<'a>>(&'a T);
+LL + struct MyStruct2<'a, T: Copy>(&'a T);
+   |
 
 error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/typeck-builtin-bound-type-parameters.rs:15:15
    |
 LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
-   |               ^^^^ -- help: remove this lifetime argument
-   |               |
-   |               expected 0 lifetime arguments
+   |               ^^^^ expected 0 lifetime arguments
+   |
+help: remove this lifetime argument
+   |
+LL - fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
+LL + fn foo2<'a, T:Copy<, U>, U>(x: T) {}
+   |
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/typeck-builtin-bound-type-parameters.rs:15:15
    |
 LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
-   |               ^^^^     - help: remove this generic argument
-   |               |
-   |               expected 0 generic arguments
+   |               ^^^^ expected 0 generic arguments
+   |
+help: remove this generic argument
+   |
+LL - fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
+LL + fn foo2<'a, T:Copy<'a, >, U>(x: T) {}
+   |
 
 error: aborting due to 8 previous errors
 
diff --git a/tests/ui/typeck/typeck_type_placeholder_lifetime_1.stderr b/tests/ui/typeck/typeck_type_placeholder_lifetime_1.stderr
index e4b1c02c201..65f07bb0832 100644
--- a/tests/ui/typeck/typeck_type_placeholder_lifetime_1.stderr
+++ b/tests/ui/typeck/typeck_type_placeholder_lifetime_1.stderr
@@ -2,15 +2,18 @@ error[E0107]: struct takes 1 generic argument but 2 generic arguments were suppl
   --> $DIR/typeck_type_placeholder_lifetime_1.rs:9:12
    |
 LL |     let c: Foo<_, _> = Foo { r: &5 };
-   |            ^^^    - help: remove this generic argument
-   |            |
-   |            expected 1 generic argument
+   |            ^^^ expected 1 generic argument
    |
 note: struct defined here, with 1 generic parameter: `T`
   --> $DIR/typeck_type_placeholder_lifetime_1.rs:4:8
    |
 LL | struct Foo<'a, T:'a> {
    |        ^^^     -
+help: remove this generic argument
+   |
+LL -     let c: Foo<_, _> = Foo { r: &5 };
+LL +     let c: Foo<_, > = Foo { r: &5 };
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/typeck/typeck_type_placeholder_lifetime_2.stderr b/tests/ui/typeck/typeck_type_placeholder_lifetime_2.stderr
index fcb5ecc4042..b07cc225ba8 100644
--- a/tests/ui/typeck/typeck_type_placeholder_lifetime_2.stderr
+++ b/tests/ui/typeck/typeck_type_placeholder_lifetime_2.stderr
@@ -2,15 +2,18 @@ error[E0107]: struct takes 1 generic argument but 2 generic arguments were suppl
   --> $DIR/typeck_type_placeholder_lifetime_2.rs:9:12
    |
 LL |     let c: Foo<_, usize> = Foo { r: &5 };
-   |            ^^^    ----- help: remove this generic argument
-   |            |
-   |            expected 1 generic argument
+   |            ^^^ expected 1 generic argument
    |
 note: struct defined here, with 1 generic parameter: `T`
   --> $DIR/typeck_type_placeholder_lifetime_2.rs:4:8
    |
 LL | struct Foo<'a, T:'a> {
    |        ^^^     -
+help: remove this generic argument
+   |
+LL -     let c: Foo<_, usize> = Foo { r: &5 };
+LL +     let c: Foo<_, > = Foo { r: &5 };
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/ufcs/ufcs-qpath-missing-params.stderr b/tests/ui/ufcs/ufcs-qpath-missing-params.stderr
index 2338871218b..0ae92d204b6 100644
--- a/tests/ui/ufcs/ufcs-qpath-missing-params.stderr
+++ b/tests/ui/ufcs/ufcs-qpath-missing-params.stderr
@@ -34,15 +34,18 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli
   --> $DIR/ufcs-qpath-missing-params.rs:17:26
    |
 LL |     <String as IntoCow>::into_cow::<str>("foo".to_string());
-   |                          ^^^^^^^^------- help: remove these generics
-   |                          |
-   |                          expected 0 generic arguments
+   |                          ^^^^^^^^ expected 0 generic arguments
    |
 note: method defined here, with 0 generic parameters
   --> $DIR/ufcs-qpath-missing-params.rs:4:8
    |
 LL |     fn into_cow(self) -> Cow<'a, B>;
    |        ^^^^^^^^
+help: remove these generics
+   |
+LL -     <String as IntoCow>::into_cow::<str>("foo".to_string());
+LL +     <String as IntoCow>::into_cow("foo".to_string());
+   |
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr
index 5a2de132d70..ac56d1d05fa 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr
@@ -2,15 +2,18 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:17
    |
 LL | fn foo1(_: &dyn Zero()) {
-   |                 ^^^^-- help: remove these parenthetical generics
-   |                 |
-   |                 expected 0 generic arguments
+   |                 ^^^^ expected 0 generic arguments
    |
 note: trait defined here, with 0 generic parameters
   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
    |
 LL | trait Zero { fn dummy(&self); }
    |       ^^^^
+help: remove these parenthetical generics
+   |
+LL - fn foo1(_: &dyn Zero()) {
+LL + fn foo1(_: &dyn Zero) {
+   |
 
 error[E0220]: associated type `Output` not found for `Zero`
   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:17
@@ -22,43 +25,52 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:10:17
    |
 LL | fn foo2(_: &dyn Zero<usize>) {
-   |                 ^^^^------- help: remove these generics
-   |                 |
-   |                 expected 0 generic arguments
+   |                 ^^^^ expected 0 generic arguments
    |
 note: trait defined here, with 0 generic parameters
   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
    |
 LL | trait Zero { fn dummy(&self); }
    |       ^^^^
+help: remove these generics
+   |
+LL - fn foo2(_: &dyn Zero<usize>) {
+LL + fn foo2(_: &dyn Zero) {
+   |
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:14:17
    |
 LL | fn foo3(_: &dyn Zero <   usize   >) {
-   |                 ^^^^-------------- help: remove these generics
-   |                 |
-   |                 expected 0 generic arguments
+   |                 ^^^^ expected 0 generic arguments
    |
 note: trait defined here, with 0 generic parameters
   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
    |
 LL | trait Zero { fn dummy(&self); }
    |       ^^^^
+help: remove these generics
+   |
+LL - fn foo3(_: &dyn Zero <   usize   >) {
+LL + fn foo3(_: &dyn Zero) {
+   |
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:18:17
    |
 LL | fn foo4(_: &dyn Zero(usize)) {
-   |                 ^^^^------- help: remove these parenthetical generics
-   |                 |
-   |                 expected 0 generic arguments
+   |                 ^^^^ expected 0 generic arguments
    |
 note: trait defined here, with 0 generic parameters
   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
    |
 LL | trait Zero { fn dummy(&self); }
    |       ^^^^
+help: remove these parenthetical generics
+   |
+LL - fn foo4(_: &dyn Zero(usize)) {
+LL + fn foo4(_: &dyn Zero) {
+   |
 
 error[E0220]: associated type `Output` not found for `Zero`
   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:18:17
@@ -70,15 +82,18 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:23:17
    |
 LL | fn foo5(_: &dyn Zero (   usize   )) {
-   |                 ^^^^-------------- help: remove these parenthetical generics
-   |                 |
-   |                 expected 0 generic arguments
+   |                 ^^^^ expected 0 generic arguments
    |
 note: trait defined here, with 0 generic parameters
   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
    |
 LL | trait Zero { fn dummy(&self); }
    |       ^^^^
+help: remove these parenthetical generics
+   |
+LL - fn foo5(_: &dyn Zero (   usize   )) {
+LL + fn foo5(_: &dyn Zero) {
+   |
 
 error[E0220]: associated type `Output` not found for `Zero`
   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:23:17
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr
index 130b193d69c..3736f25a51f 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr
@@ -2,15 +2,18 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
   --> $DIR/unboxed-closure-sugar-wrong-trait.rs:5:8
    |
 LL | fn f<F:Trait(isize) -> isize>(x: F) {}
-   |        ^^^^^------- help: remove these parenthetical generics
-   |        |
-   |        expected 0 generic arguments
+   |        ^^^^^ expected 0 generic arguments
    |
 note: trait defined here, with 0 generic parameters
   --> $DIR/unboxed-closure-sugar-wrong-trait.rs:3:7
    |
 LL | trait Trait {}
    |       ^^^^^
+help: remove these parenthetical generics
+   |
+LL - fn f<F:Trait(isize) -> isize>(x: F) {}
+LL + fn f<F:Trait -> isize>(x: F) {}
+   |
 
 error[E0220]: associated type `Output` not found for `Trait`
   --> $DIR/unboxed-closure-sugar-wrong-trait.rs:5:24